How can I avoid repeating DocumentRoot in this Apache virtual host?
- by David Faux
I have an Apache virtual host configured for a website powered by Wordpress.
<VirtualHost *:80>
ServerName 67.178.132.253
DocumentRoot /home/david/wordpressWebsite
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond /home/david/wordpressWebsite%{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
</VirtualHost>
How can I avoid hard-coding /home/david/wordpressWebsite twice? I don't want to use REQUEST_URI since that involves an extra request.