Question

Default Index file is not loading

Posted September 24, 2016 1.8k views
UbuntuApache

Hi All,
I have just started my instance and have a basic problem. The default index.php is not loading in one of my directory - unless I put a backslash manually.
The directory is - http://4brownbag.com/lamp

The htaccess file in the directory says the following

DirectoryIndex index.php index.html
ErrorDocument 404 "[404 error] If you're seeing this error after install, check$

Options +FollowSymLinks
Options -Multiviews

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([a-zA-Z0-9-]+)$ $1.php [L]

I have gone through various articles to resolve and yet got nothing. Will appreciate any solution to this as the issue is exposing the installation terribly.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

what is your root directory? …and what directory is the index.php in?

Good to hear from you and
My root directory is - /var/www/html/
All working well under this directory and i can access this by putting up www.4brownbag.com. However

/var/www/html/lamp - this directory is giving me the tough time.
This i want to access like this - http://4brownbag.com/lamp

Eagerly waiting for any solution or help while I am still looking around like anything :)

Cheers and Regards

JP Singh

Submit an Answer