Jump to content

[SOLVED] URL Rewrites


vbnullchar

Recommended Posts

i have this link "http://server/directory/" which is the old url of our server, but yesterday we change the name of our server to something like this "http://server2/directory/" the problem now is there are thousands of records in our db that has the url of our old server.

 

is possible to have something like this <a href=http://server/directory/>Home</a> but will go to "http://server2/directory" instead.

 

:note, the old server doesnt exists anymore so i cannot make some redirect scripts from the old server to the new one.

 

thanks alot,

Link to comment
Share on other sites

Sooooooo

 

What happened to Server1?

 

Do you still have any access to it?  Because you'd need to do something to Server1 to get a rewrite to work.  Do you own the domain name of Server1?  Can you move it to Server2?

 

You see, if I own crazywebsites.com and you steal it, I can't make anything on that site go to my new site at crazywebsitestoo.com unless I have some access to the original server or atleast the original domain.

 

Does that make sense?

Link to comment
Share on other sites

server2 was the old server1, we re-setup and change name..

 

heres what i got in my .htaccess, i found is here http://www.ilovejackdaniels.com/apache/mod_rewrite-cheat-sheet/

 

# Site has permanently moved to new domain

RewriteCond  %{HTTP_HOST}    ^www.domain.com$  [NC]

RewriteRule  ^(.*)$  http://www.domain2.com/$1 [R=301,L] TIME_SEC

 

can you modify this code to fit the urls below?

 

server1 = http://intranet/portal

server2 = http://iportal/home

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.