...

View Full Version : .htaccess Rewrite problem with format



sixf00t4
07-13-2010, 03:33 PM
I switched from one blogging platform to another, but the post IDs are the same between the two. so where:


RewriteRule ^article([1-9][0-9]*).* modules.php?name=News&file=article&sid=$1 [L]

made URLs like /article123.html point to modules.php?name=News&file=article&sid=123

With the new blogging platform, I want to direct the article123.html requests that exist in search engines to the new platform system, which would be ?p=123

so why won't this work?

RewriteRule ^article([0-9]*).*$ ?p=$1 [L]

Inigoesdr
07-17-2010, 07:32 PM
That works for me. Try going directly to the URL with a valid ID and see if the page loads, and/or dumping the variable to see if you get the value passed to the script. Or are you saying the request is never matched to begin with? Your regex is slightly different than the old one... it required there to be at least one number.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum