catsgrave

Registered
Mar 24, 2006
2
0
151
hi cpanel gurus,

I accidentally deleted my .htaccess file. I don't know how to restore it
Is this file important? pls help

Thanks,
mervin
 

Murtaza_t

Well-Known Member
Jan 24, 2005
474
0
166
Earth
cPanel Access Level
Website Owner
It depends on what you had in that file. Check if your site is working as it should be, does it have any 500 Internal server erros? How ever it is always possible to create that file.

So one more lesson to know importance of backups... ;)
 

webignition

Well-Known Member
Jan 22, 2005
1,876
1
166
The behaviour you describe, that is going to http://example.com/index.php when you visit the URL in http://example.com/, should be handled by Apache by default.

However there are a variety of default handlers that Apache may use, chosen based on the order they are supplied in the configuration file. For example if you had an index.html and an index.php file, it is likely that Apache will default to the .html file if present, instead of defaulting to the .php file.

The most straightforward solution would be to remove all index.* files, leaving only index.php.

If this is what you have done, you should contact your host to see if Apache is configured correctly.