Reputation: 2428
I'm working with virtual hosts. I've created a _wordpress.conf file:
# WordPress
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
... and included it in my vhosts.conf
<VirtualHost *:80>
ServerName example.org
DocumentRoot /var/www/example.org
<Directory /var/www/example.org>
Include _wordpress.conf
</Directory>
</VirtualHost>
The configuration only works with the Directory tag. I want to simplify this configuration like:
# _wordpress.conf
<Directory %{DOCUMENT_ROOT}>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</Directory>
And...
# vhosts.conf
<VirtualHost *:80>
ServerName example.org
DocumentRoot /var/www/example.org
Include _wordpress.conf
</VirtualHost>
It's possible? I've tried a lot and have no success... =/
Upvotes: 1
Views: 296