Apache file appearing in directory list, but giving 404 when attempting access?
Posted
by
aayush
on Server Fault
See other posts from Server Fault
or by aayush
Published on 2013-11-07T14:36:40Z
Indexed on
2013/11/07
15:57 UTC
Read the original article
Hit count: 208
apache2
Please forgive my lack of knowledge, this is more of a learning project than anything else.
I have a linux box, and it works pretty much fine. When i go to example.com/css it says theres one file in there, bootstrap.min.css When i go to example.com/css/bootstrap.min.css, it gives me a 404 error.
I have only one htaccess file to remove the index.php from the url, which also i renamed to htaccess (Instead of .htaccess, so apache wont find it) and i restarted the server, yet no help. I also tried to chmod the css file 755 but no help.
Contents of the htaccess file:
RewriteEngine On
RewriteBase /
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
Please help, i am very confused about this. I tried to google excessively but i came up with nothing.
Edit: I found the solution to be renamed the htaccess file to something entirely different and restarting. Is there any way i can still implement the losing of the .php?
© Server Fault or respective owner