pb&j
01-16-2003, 06:58 AM
I had a site change from "html" extensions over to "shtml". Some files are "htm" and those were good to stay that way. Someone advised to put this as my htaccess file to convert any "html" over to "shtml" ...
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.htm$ $1 [C,E=WasHTML:yes]
RewriteCond %{REQUEST_FILENAME}.shtml -f
RewriteRule ^(.*)$ $1.shtml [S=1,R]
RewriteCond %{ENV:WasHTML} ^yes$
RewriteRule ^(.*)$ $1.htm
No problem. Works perfectly.
Now my site is going over to a "php" extension. One problem though, a few pages are going to stay as "shtml" on them. There are still the few from previous that are still staying "htm" too.
So the question is... how do I adjust my htaccess file now? Most pages used to be shtml but are now php. There are a few pages that must be left as shtml so I dont want "all" traffic directed to "php" only. Any htaccess gurus around for this? Or any workarounds if it means putting these few into a different directory or whatever...
Thanks!
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.htm$ $1 [C,E=WasHTML:yes]
RewriteCond %{REQUEST_FILENAME}.shtml -f
RewriteRule ^(.*)$ $1.shtml [S=1,R]
RewriteCond %{ENV:WasHTML} ^yes$
RewriteRule ^(.*)$ $1.htm
No problem. Works perfectly.
Now my site is going over to a "php" extension. One problem though, a few pages are going to stay as "shtml" on them. There are still the few from previous that are still staying "htm" too.
So the question is... how do I adjust my htaccess file now? Most pages used to be shtml but are now php. There are a few pages that must be left as shtml so I dont want "all" traffic directed to "php" only. Any htaccess gurus around for this? Or any workarounds if it means putting these few into a different directory or whatever...
Thanks!