Skip to content

Instantly share code, notes, and snippets.

@mrchrisadams
Created May 20, 2010 14:43
Show Gist options
  • Save mrchrisadams/407641 to your computer and use it in GitHub Desktop.
Save mrchrisadams/407641 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
ServerAdmin unix.admin@company.com
DocumentRoot /srv/html/domain.com/
ServerName domain.com
ServerAlias www.domain.com
ErrorLog logs/domain.com-error_log
CustomLog logs/domain.com common
RewriteEngine On
# addign this to stop being stuck in an infinite loop
RewriteCond %{REQUEST_URI} !^/\?p\=.*
# use this source for mappings
RewriteMap site_migration.map txt:/etc/httpd/conf.d/site_migration.map
# make request for http://domain/publications/jobdescriptionexecutiveassistant fetch resource at http://domain/p?5590
RewriteRule ^(.*) ?p=${site_migration.map:$1}
<Directory /srv/html/domain.com/>
AllowOverride All
</Directory>
</VirtualHost>
/publications/jobdescriptionexecutiveassistant 5590
# plus something like 5600 + more urls to redirect to the related posts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment