vbnullchar Posted August 17, 2007 Share Posted August 17, 2007 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, Quote Link to comment Share on other sites More sharing options...
uhmcastillo Posted August 17, 2007 Share Posted August 17, 2007 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? Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted August 17, 2007 Author Share Posted August 17, 2007 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 Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted August 17, 2007 Author Share Posted August 17, 2007 bump Quote Link to comment Share on other sites More sharing options...
hackerkts Posted August 17, 2007 Share Posted August 17, 2007 Try this, RewriteCond %{HTTP_HOST} ^intranet/portal$ [NC] RewriteRule ^(.*)$ http://iportal/home$1 [R=301,L] not very sure if it works.. Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted August 17, 2007 Author Share Posted August 17, 2007 sorry but its not working.. Firefox can't find the server at intranet. Quote Link to comment Share on other sites More sharing options...
hackerkts Posted August 17, 2007 Share Posted August 17, 2007 How does the real server1 and server2 link looks like? Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted August 17, 2007 Author Share Posted August 17, 2007 server1 = http://intranet/portal/ server2 = http://iportal/home/ Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted August 21, 2007 Author Share Posted August 21, 2007 bump! Quote Link to comment Share on other sites More sharing options...
trq Posted August 21, 2007 Share Posted August 21, 2007 Do both these domains point to the same machine? Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted August 21, 2007 Author Share Posted August 21, 2007 the server1 is not existing anymore the server2 is the new server. i need a user to be redirected to http://iportal/home where he clicks the link http://intranet/portal Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted August 21, 2007 Author Share Posted August 21, 2007 heres what i have RewriteCond %{HTTP_HOST} ^http://intranet/$ [NC] RewriteRule ^(.*)$ http://iportal/$1 [R,L] http://intranet/ redirects to http://iportal/home.. this is okay but http://intranet/portal/?action=view --> is requested URL not found. Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted August 21, 2007 Author Share Posted August 21, 2007 bump! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.