Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to setup VirtualHost, but include it's rewrites from another file? Using .htaccess is not allowed. Something like this, I suppose...

<VirtualHost 127.0.0.12>
SetEnv APP_ENV dev
...
Include /path/to/vhostrewrite.conf
</VirtualHost>

Thank you!

share|improve this question

The short answer is yes. I'd recommend putting your includes in an IfModule tag as well, e.g:

<IfModule mod_rewrite.c>
    Include conf/mod_rewrite_rules.conf
</IfModule>

Configuration changes to the rewrite rules will require a reload of the entire configuration as opposed to .htaccess.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.