If you have mod_rewrite installed - put the following in your .htaccess file:


RewriteEngine on

RewriteRule ^index\.html$ index.php [L]

That will cause index.php to be called when index.html is requested.
If you want it to forward to index.php then use [R] instead of [L]

If you want all .html to be sent to php equivalents -

RewriteRule (^.*)\.html$ $1.php [L]

should do the trick.

btw - with those rules, the .html files do not need to exist. If/ when they are requested, whether they exist or not, the link or redirect is made.

mod_rewrite rocks


Thanks to you both Michael & Dan,

I must not have mod-rewrite installed (I am 98% uneducated about apache/server admin). I will save your post though MIchael, for when I get more to that level.. you gave a good lead.

Meanwhile, Dan you gave me the quick fix lead I was after.
DirectoryIndex index.php
works.
Found it at
http://httpd.apache.org/docs/1.3/mod/mod_dir.html#directoryindex

-G


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to