htaccess help

I inherited a website that uses an htaccess file that's simply over my head...

I have a development environment setup in a subdomain, but it appears that all requests are getting re-directed back to the main directory. How can I setup an exclusion for my subdomain so that all development requests (e.g. "") bypass these rules?

Urgent! Thanks.

Who is Participating?
arober11Connect With a Mentor Commented:

Add your sub-domain to the following rule:

# Additional condition
RewriteCond %{HTTP_HOST} !^DEV-SUB-DOMAIN\.domain\.com [NC] 
RewriteCond %{HTTP_HOST} !^domain\.com [NC] 
RewriteRule ^(.*)$$1 [R=301,L]

Open in new window

Then strip or replace with http://%{HTTP_HOST} all the strings from the RewriteRule lines e.g.

RewriteRule ^login/ [L,R=301]
RewriteRule ^login/     /Security/login [L,R=301]
# Or Alternitively
RewriteRule ^login/     http://%{HTTP_HOST}/Security/login [L,R=301]

Open in new window

sjl570Author Commented:
I'm no expert, but it looks like this should work. We're coming across some strange cache-related issues that are confusing the situation, so I can't verify whether this solves the problem. A work in progress... I appreciate your time - and hopefully this will help others in the same situation. Thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.