naazanin
naazanin

Reputation: 127

styles not applied when using .htaccess

I put this piece of code in the includes directory to avoid users having access to its content:

order allow,deny
deny from all

and I use the code below to redirect error 403 to particular error page,this is place in parent root (website) of the includes directory:

ErrorDocument 403 /errors/403.html

... but the styles don't apply to the pages. What is the problem?

Note: the errors directory is placed in "website" and "styles" directory placed in "includes" directory

Upvotes: 0

Views: 119

Answers (1)

Capricorn
Capricorn

Reputation: 2089

As you deny the access to the includes folder, the users browser is not able to get the files in your styles folder, assuming the CSS stylesheets necessary for styling the page. Instead it receives an error 403 "Forbidden".

See deny directory listing with htaccess if you want to disable directory listing and thus only allow the user to access files directly.

Upvotes: 1

Related Questions