|
|
Subject:
RewriteRule not working as expected
Category: Computers > Software Asked by: geoffreyf67_gman-ga List Price: $40.00 |
Posted:
19 May 2006 15:17 PDT
Expires: 18 Jun 2006 15:17 PDT Question ID: 730528 |
I've got several RewriteRules in my .htaccess file that I want to get processed. When it comes across this line: RewriteRule ^([0-9]+)/(.*).html$ /results.php?KEYWORDID=$1 [L] It rewrites it into /results.php?KEYWORDID=1234 But it then continues processing the other lines in my htaccess file. As I understood it, the [L] should tell apache to stop rewriting at this point. The url is on the same server so I don't think [R] would apply here would it? Some help would be greatly appreciated! G-Man |
|
Subject:
Re: RewriteRule not working as expected
Answered By: webadept-ga on 19 May 2006 16:41 PDT |
Hi, I've always seen it used as [R,L], never just [L]. --- Remember: An unconditional external redirect to your own server will not work with the prefix http://thishost because of this feature. To achieve such a self-redirect, you have to use the R-flag --- http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html I'm guessing it is ignoring the [L] because it failed to do anything on that line. Try the [R, L] and if that doesn't work, post the version of Apache you are using (shouldn't really matter, but sometimes little bugs are discovered). thanks, webadept-ga | |
| |
|
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |