HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   mod rewrite help (http://www.howtoforge.com/forums/showthread.php?t=59606)

Toucan 16th November 2012 17:02

mod rewrite help
 
I've moved a site from .aspx to my php server and now i'm trying to preserve the incoming links using rewrite rules in .htacess.

I've tried this:
Code:

#THIS WILL BE DONE FOR EVERY SIMILAR PAGE --->
Redirect /du-represented-dmcs/denmark.aspx http://www.dudmc.com/dmcs-worldwide/dmc-partners/european/24-denmark-dmc
#THIS IS TO CATCH EVERYTHING ELSE--->
RewriteRule ^(.*)\.aspx$ http://www.dudmc.com/
Redirect /Info-Request-Forms/RFP.aspx http://www.dudmc.co.uk/du-service/request-for-proposal

The problem is the second rule seems to overwrite the second and the 3rd.
Without it the redirects work fine.

I'm trying to get this done before google starts losing interest in the existing links..

Thanks

falko 17th November 2012 08:34

I'd try RewriteRule for those Redirect rules as well. You can then use a flag like L (e.g. [R=301,L]) to stop the rewrite process. See http://httpd.apache.org/docs/2.2/mod...ml#rewriterule


All times are GMT +2. The time now is 22:04.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.