|
|
Subject:
Apache (2.0) mod_rewrite
Category: Computers > Programming Asked by: capitalcitydesign-ga List Price: $5.00 |
Posted:
29 Jul 2006 15:22 PDT
Expires: 28 Aug 2006 15:22 PDT Question ID: 750712 |
How do I block access to a specific page using Apache (2.0) mod_rewrite in an .htaccess file. I have the following already: # Append "/home" to called section if not there. RewriteRule ^(public|alumni|admin)/?$ /$1/home [R=permanent,L] # Remove trailing slash from request. RewriteRule ^(public|alumni|admin)/(.*)/$ /$1/$2 [R=permanent,L] # Send to section's processing page. RewriteRule ^(public|alumni|admin)/(.*)$ $1.php [L] If I use this, IE returns "Page can not be displayed": # Block direct access to processing pages. RewriteRule ^(public|alumni|admin).php /$1/home [R=permanent,L] | |
|
|
There is no answer at this time. |
|
Subject:
Re: Apache (2.0) mod_rewrite
From: pilgrimx182-ga on 01 Aug 2006 23:24 PDT |
I've played with these rewrites and it looks the problem is inside this rule: # Send to section's processing page. RewriteRule ^(public|alumni|admin)/(.*)$ $1.php [L] rewrites cycling till cycle limit reached and error happened. Somehow [L] doesn't help. Try to make this rewrite rule more specific to avoid cycling. And probably you should use '\.php' instead of '.php' in the last rule. |
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 |