40 lines
1.3 KiB
ApacheConf

<VirtualHost *:80>
ServerAdmin jeremy@marzhillstudios.com
DocumentRoot "/home/jwall/www/"
ServerName jeremy.marzhillstudios.com
<Directory "/home/jwall/www">
DirectoryIndex index.html
Options Indexes FollowSymLinks MultiViews
AllowOverride Options FileInfo AuthConfig Limit
Order allow,deny
Allow from all
</Directory>
RewriteEngine on
#RewriteOptions MaxRedirects=2
# first resume redirects to personal resume.pdf
RewriteCond %{REQUEST_URI} ^/resume/?$
RewriteRule ^/resume/?$ /personal/resume.pdf
# cv gets the same treatement
RewriteCond %{REQUEST_URI} ^/cv/?$
RewriteRule ^/cv/?$ /personal/resume.pdf
# now set up the rewrite rules to simulate wordpress links
# first we handle the index page case
RewriteCond %{REQUEST_URI} ^/index.php/?$
RewriteRule ^/index.php/?$ / [R=302,L]
# then we handle the tag/category page case
RewriteCond %{REQUEST_URI} ^/index.php/(tag|category)/.*
RewriteRule ^/index.php/(tag|category)/(.*)/?$ /$1/ [R=302,L]
# then we handle the entry page case
RewriteCond %{REQUEST_URI} ^/index.php/[^/]+/[^/]+/$
RewriteRule ^/index.php/[^/]+/([^/]+)/?$ /entries/$1/ [R=302,L]
</VirtualHost>