Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- permanent 301 redirect - shtml to php without extension.


lucy24 - 8:18 am on Apr 30, 2012 (gmt 0)


PROBLEM: When I remove the -f i get an internal server error

I hope you mean just the -f, not the whole Condition. You'd certainly expect an error if you remove the "matching" half of the condition!

But you don't need a Condition here at all. You're simply making the server do the same work twice-- first while evaluating the Condition, and then later when it goes to the page for real. Go ahead and let it stick a php onto the extensionless request. If the file doesn't exist you'll end up with the same 404 either way, with less work for the server.

To clarify: the / in front of the rewrite target is not necessary to make the rule work. It's a security precaution.


Thread source:: http://www.webmasterworld.com/apache/4447100.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com