#1  
Old 16th November 2012, 17:02
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 478
Thanks: 78
Thanked 39 Times in 33 Posts
Default 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
Reply With Quote
Sponsored Links
  #2  
Old 17th November 2012, 08:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
 
Default

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
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
Toucan (1st December 2012)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with mod rewrite and existing directory fmmarzoa General 4 23rd February 2012 19:52
Getting mod rewrite to work - please help manarak Installation/Configuration 2 3rd February 2011 13:05
enable mod rewrite for the ISPconfig apache web server blocker General 3 18th April 2009 16:14
mod rewrite htaccess tera7 Server Operation 4 13th September 2007 01:09
how to enable Mod Rewrite AngelDrago Installation/Configuration 9 10th August 2007 23:20


All times are GMT +2. The time now is 13:20.


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