2 blueyed Feb 18, 2007 23:56

Thanks. I'll check mod_rewrite, but I usually don't understand the jargon very well, so I was hoping someone had a scrap of existing code.
As for asking Earthlink to set something up differently, apparently you've never dealt with Earthlink: They do what they do, period.
Well, I just tried both Addhandler and RewriteRule in my htaccess file, and neither seemed to work. I'm still open to suggestions.
It would have helped if you had posted your RewriteRule set.
E.g. have you used RewriteEngine On ?
Here's the first one I tried:
RewriteEngine on
RewriteBase /webdocs/cms/
# parse out basename, but remember the fact
RewriteRule ^(.*)\.php$ $1 [C,E=WasHTML:yes]
# rewrite to document.php5 if exists
# RewriteCond %{REQUEST_FILENAME}.php5 -f
RewriteRule ^(.*)$ $1.php5 [S=1]
# else reverse the previous basename cutout
# RewriteCond %{ENV:WasHTML} ^yes$
# RewriteRule ^(.*)$ $1.php
I also tried this:
AddType application/x-httpd.php5 .php
addhandler application/x-httpd.php5 .php
These don't work, either:
AddType application/x-httpd.php .php
addhandler application/x-httpd.php .php
AddType application/x-httpd.php .php5
addhandler application/x-httpd.php .php5
You should be able to do this with RewriteCond (check for the .php ending) and the rewrite the URL with RewriteRule (internally, so no [R] or absolute URL).
Just google for mod_rewrite and you should find it.
btw: you could also use PHP4 (normal .php ending?) for it. Or ask your host to set it up the other way round.