Re: generally, where in cPanel can one set the default page to load?
| From: | Michael A. Peters | Date: | Thu, 02 Jul 2009 17:26:02 +0000 |
| Subject: | Re: generally, where in cPanel can one set the default page to load? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294831@lists.php.net to get a copy of this message | ||
Govinda wrote:
Dear list-members I am using what I assume is a pretty standard cPanel setup (?) I would like to be able change the mime types/extension so that ".html" gets sent through the PHP interpreter, but I see the cPanel docs say "...(note that you can not alter the system defined mime type values)..". So as a workaround, I need to *at least* be able to change the default file to return to the browser when someone hits my domain (or a subdirectory) without specifying the page in that dir/ to load. I cannot find where in cPanel to set that. The default now is theIf 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 rocksstandard "index.html". I want to change it to "index.php".I realize this is really basic stuff, but I can't find it in my cPanel. Can someone point me to this? -Govinda