.htaccess 301 redirect on /index.html file redirects subdomain /index.html file.

Asked by:
neslho
Time:
2012-10-13 8:02 pm
Category:
Htaccess
Hits:
356
I have a 301 redirect on the homepage of danohlsen.com like this:
redirect 301 /index.html http://danohlsen.com/projects/

I have a subdomain dev.danohlsen.com located at:
/dev

It seems I cannot access dev.danohlsen.com/index.html because of the redirect I setup for /index.html. Is there a way to setup the 301 redirect to only affect danohlsen.com/index.html and not dev.danohlsen.com/index.html?

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

You must login before you can submit an answer.

OTHER ANSWERS

0

johnpaulb-whh2
2012-10-15 1:03 pm
Hello neslho,

Thank you for your question regarding .htaccess rewrite. It sounds like the .htaccess is affecting the folders below it, you can avoid this by creating a new .htaccess file in the /dev folder, and turning the rewrite engine off in the new .htaccess.

This will cause the new .htaccess to override the rules created in the original one.

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul

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

Like this Question?

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

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

Not a Customer?

Get web hosting from a company that is here to help.