vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Forum and Server Management (https://vborg.vbsupport.ru/forumdisplay.php?f=232)
-   -   Changed domains, looking for a hack (https://vborg.vbsupport.ru/showthread.php?t=213646)

MuSuL 05-13-2009 11:58 PM

Changed domains, looking for a hack
 
I changed my domain and I'm looking for a hack that will take all my internal links (i.e. links in a thread that point to another thread on my forum) and change it to the new domain name.

Does something like this exist?

fattony69 05-14-2009 12:46 AM

Seems like all you need is .htaccess

MuSuL 05-14-2009 12:49 AM

I don't have access to the old domain.

Is there something I can do on the new one? Can you explain?

fattony69 05-14-2009 02:47 AM

Oh, you don't have access to the other domain?

You are going to have a problem. You need that. You put an .htaccess file to redirect users, but since you don't have it, you can't do that. You might not be able to do anything.

veenuisthebest 05-14-2009 04:03 AM

lol if you don't own the older domain now, how can you control it. As said above, you have to park the old domain and with few lines of htaccess rewrites its really easy to do.

COBRAws 05-18-2009 03:15 AM

Hey guys, his problem is that he needs the posted links (links to other parts of his forum) to update those URL's with the new domain.

MuSuL, you will have to do a search and replace kinda thing, the only possible solution would be to go phpMyAdmin and do it thru there.

snakes1100 05-18-2009 01:24 PM

Quote:

Originally Posted by COBRAws (Post 1812740)
Hey guys, his problem is that he needs the posted links (links to other parts of his forum) to update those URL's with the new domain.


MuSuL, you will have to do a search and replace kinda thing, the only possible solution would be to go phpMyAdmin and do it thru there.

There is no need to go into PMA and change anything as your directing, the answer was given already, a simple htaccess rewrite rule of the old domain will suffice.

@MuSul, post in the programming section and see if someone will help you write the needed htaccess rewrite rule or post in the paid job forum for a paying job if no one will do it for free.

MuSuL 05-18-2009 03:59 PM

I had gone ahead and edited all 1200 of them. I was thinking on writing a piece of code but it only took 2 hours to do it manually. No biggie.

What would the .htaccess file have looked like? I don't have experience with them.

UKBusinessLive 05-18-2009 05:43 PM

Quote:

Originally Posted by MuSuL (Post 1813012)
I had gone ahead and edited all 1200 of them. I was thinking on writing a piece of code but it only took 2 hours to do it manually. No biggie.

What would the .htaccess file have looked like? I don't have experience with them.

An Example .htaccess file looks something like this

PHP Code:

Options +FollowSymLinks 
RewriteEngine on

RewriteCond 
%{HTTP_HOST} ^www.old-domain.com$ [NC]
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L] 

That would delivert all traffic from the "old" domain to the "new

Just edit the above and save it to your desktop as htaccess.txt

Then upload this file to your root directory, once there rename it to .htaccess

Notice where the dot is and that the .txt has now disappered, thats it :D


All times are GMT. The time now is 01:25 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01024 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete