Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Problem using mod_rewrite / .htaccess in the root directory


PhilC - 11:48 pm on Feb 17, 2004 (gmt 0)


One more thing, if I may.

I'm using the following RewriteRules to divert all .html and requests for the domain to the rewrite.php script.

#cover for a request for the domain
RewriteRule ^$ rewrite.php [T=application/x-httpd-php] [L]

#send requests for all html files, in this directory only, to rewrite.php
RewriteRule ^(.*)\.html$ rewrite.php [T=application/x-httpd-php]

I'm not well up on regular expressions but I'm thinking that it should be possible to combine the 2 rules into one with an OR operator. I've looked around but I haven't found any example of a regex OR. Can it be done?


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