0

I have .htaccess file which is using on multiple domains.

Now I have part of this code which I must run only on my development site.

Is it possible to put if / else statement in .htaccess file?

This is part of code which I must run only on dev. site

AuthType Basic
AuthName "Login required"
AuthUserFile "/var/www/dev.mysite.com/.htpasswd"
ErrorDocument 401 default

<Files "login.php">
require valid-user
</Files>
iWizard
  • 6,816
  • 19
  • 67
  • 103
  • Check here http://stackoverflow.com/questions/11528634/how-do-i-use-if-else-type-statements-in-my-htaccess ad here http://stackoverflow.com/questions/2833004/simulating-a-2-level-if-else-using-rewritecond – Yogus May 21 '13 at 10:42
  • Here is also [SO accepted answer](http://stackoverflow.com/questions/1234919/can-i-do-an-if-then-else-in-htaccess) which can help you. – Smile May 21 '13 at 10:44
  • @NullVoid - something like this would be great, but that code doesn't work for me – iWizard May 21 '13 at 10:47

0 Answers0