rassy Posted August 17, 2012 Share Posted August 17, 2012 Hi guys, I need help! After a website relaunch my indexed google links stopped working. DAMN! I have a page indexed as "http://www.mysite.com/foo/" and I would like to redirect it to a new static html page called "http://www.mysite.com/foo.html" My rule looks like this: (.htaccess) RewriteEngine on RedirectPermanent http://www.mysite.com/foo[b]/[/b] http://www.mysite.com/foo.html The BIG Problem is: When I hit "http://www.mysite.com/foo/" I get a 404 error!! It works without the ending "Slash" ("/") BUT this is NOT what google currently has indexed! So right now I get an 404 when opening the index webpage from google. Do you guys now how to handle this? I guess I am doing something wrong in the htaccess! Thank you so much for your support! Rassy Link to comment Share on other sites More sharing options...
mexique1 Posted August 17, 2012 Share Posted August 17, 2012 Check the docs of the Redirect directive : http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect Seems the first part needs to be a relative URL. Try : RedirectPermanent /foo http://www.mysite.com/foo.html Link to comment Share on other sites More sharing options...
rassy Posted August 17, 2012 Author Share Posted August 17, 2012 (edited) Hi mexique1, thanks for your quick repsonse. I changed the .htaccess to: RewriteEngine on RedirectPermanent /foo/ http://www.mysite.com/foo.html The problem remains: I get an 404 error when entering "http://www.mysite.com/foo/" (WITH THE ENDING SLASH "/"). Any ideas?? Edited August 17, 2012 by rassy (see edit history) Link to comment Share on other sites More sharing options...
shokinro Posted August 17, 2012 Share Posted August 17, 2012 try to clear your browser cache and/or restart the browser, sometimes the browser does not recognize the changes you made once there is an error. I had this experience with FireFox. I got 404 error, then I fixed the the error, but the Firefox always show 404 error until I closed the browser and restart it. Link to comment Share on other sites More sharing options...
rassy Posted August 18, 2012 Author Share Posted August 18, 2012 Hi guys, thanks a lot for your help!! :-) I actually found the problem: I had some other rewrite rule BEFORE the actual rewrite directives with an "L" in there which means: All other rules will not be proceeded... This htaccess is some strange shit! :-) Enjoy! Link to comment Share on other sites More sharing options...
Recommended Posts