httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "/dev/null" <>
Subject [users@httpd] Re: How to rewrite URL if substitue file exists?
Date Mon, 29 Sep 2003 01:05:27 GMT
> for file (.*).html if $1.php exists, rewrite, otherwise let the html page
> used.
> That way all the nav links will all work fine and from the user's
> perspective only html pages are being served up.

This is how we ended up doing it:

RewriteCond %{REQUEST_URI} ^/(.*).html$
RewriteCond insert_doc_root_here/%1.php -f
RewriteRule (.*).html $1.php


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message