jeudi 21 décembre 2017

File exists in Directory but giving 404 error when accessed in browser

I am using Apache for a web app. When the user signs up, a new folder is created for them so that their dashboard is personalised. When I do a test user sign-up and check if the folder exists in FTP it always shows up containing all the necessary files. But when I navigate to the folder in my browser window it returns a 404 error message saying the page cannot be found. There is an index file in each folder so it should show up automatically as I understand it. I have tried changing the permissions on the created folders but this doesn't seem to have any effect. I have also added the following to the Apache directives:

Alias /web "/var/www/web"
Options +Indexes
AllowOverride None

However, this does not solve the problem either.

Folders and file names contain no spaces or special characters. File permissions given to files are 0644 and folders within the folder are 0755. How would I find out if they have been placed in an accessible folder by apache? I am using ispconfig.

Here are the rewrite rules being used:

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME}.php -f 
RewriteRule (.*) $1.php [L] 
RewriteCond %{REQUEST_FILENAME}.html -f 
RewriteRule (.*) $1.html [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d </IfModule>




Aucun commentaire:

Enregistrer un commentaire