LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Best way to redirect legacy URLs with Rewrite Map?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2007, 03:17 AM
subBlue subBlue is offline
Member
 
Join Date: Oct 2006
Posts: 42
Default Best way to redirect legacy URLs with Rewrite Map?

I am updating a site where the new version will have slightly different URLs for the main sections. I want to use Rewrite Map to create a text file with a list of rules that will point some of the key old addresses to the new URLs.

I've created a url map file which contains source/target URLs like:
Code:
news.asp news
showcase.asp showcase
info.asp about_us/information
I've saved this as a text file and added it to the Rewrite Map dialogue as:
name: legacy
location: txt:/var/www/vhosts/mysite.com/rewrite.txt

In the rewrite field I then have:
Code:
RewriteRule ^(.*)$ ${legacy:$1} [R=301]
However, I'm finding that Firefox pops up and says that I'm redirecting in a way that will never complete.
Any suggestions on what is going wrong here?
Reply With Quote
  #2  
Old 01-18-2007, 09:51 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Rewrite map is not a right solution for what you want exactly. As the rewrite rule will match all URL no matter it is in the rewrite map file or not. You have to use individual rewrite rule to handle different mapping, may be for mapping info.asp -> about_us/information, another generic one to strip ".asp" off the URL.
Reply With Quote
Reply

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


All times are GMT -7. The time now is 08:03 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.