Page is a not externally linkable
jdMorgan - 12:09 am on Feb 18, 2004 (gmt 0)
This should do it, plus bring your regex in line with the objective you posted -- to redirect requests for .html resources in the root directory only. "^.*\.html$" would redirect for any .html file in any directory, while "^[^/.]*\.html$" redirects only if the filename is not preceded by a slash (which would indicate a subdirectory request) or another period (this just makes the regex processing for this case faster). If you *do* want to redirect .html requests in subdirectories, then you could use "^[^.]*\.html$" or your original "^.*\.html$" shortened to "\.html$". In either case, the parentheses are not needed, since you are not creating a back-reference or a complex nested OR pattern. Ref: [etext.lib.virginia.edu...] Jim
PhilC,
RewriteRule ^$¦^[^/.]*\.html$ rewrite.php [T=application/x-httpd-php]
Note that you must replace the broken pipe "¦" character with a solid pipe character from your keyboard before use.