InMotion Hosting Support Center

Why won't my htaccess file work on your servers?

Category: Server Usage

2012-04-03 5:08 pm EST

Hits: 3,828
My allow/deny directives are not working on the inmotionhosting servers, but they were working before. I contacted support and their response will not work. The htaccess file is set up correctly. It must be a server issue.

You must login before you can ask a follow up question.

You must login before you can submit an answer.



5,399 Points
2012-04-04 8:10 am EST
Hi jeannies,

Within your .htaccess file, you are using:
<strong>order allow,deny</strong>
... to allow / prevent access to your website.

While looking into this further, I found that the order in which you have allow,deny is very important.

<strong>order allow,deny</strong> - The allow statements will be ran first

<strong>order deny,allow</strong> - The deny statements will be ran first

Because you are using <u>order allow,deny</u> and you have <u>allow from all</u>, it would make sense that this directive is being processed first, thus allowing everyone to view your website.

I would suggest updating your .htaccess file and changing <u>order allow,deny</u> to <u>order deny,allow</u>. This will run all of your deny statements first, and if there is no match, the user will be allowed in. Let us know if this helps or not.

- Brad

You must login before you can post a comment about this answer.

Like this Question?

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!