httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "/dev/null" <dev.n...@BeginThread.com>
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
be
> 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

/dev/null


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message