Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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.