The Easiest Way to Save and Share Code Snippets on the web

Untitled

apache

posted: Nov, 26th 2011 | jump to bottom

RewriteEngine On
 
#rewriting wordpress stuff to the root
 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/wp-(content|admin|includes|login|cron)(\.php)?
RewriteCond %{HTTP_HOST} ([a-zA-Z0-9-]+\.([a-z]{2,4})|co\.uk|me\.uk|org\.uk|priv\.no)$
RewriteRule ^(.*)$ http://%1/%{REQUEST_URI} [L,QSA]
 
 
#rewriting everying that can't be found to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^index\.php$ - [L]
 
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
 
#rewriting everything else to index.php
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteCond %{REQUEST_URI} !^/wp-(content|admin|includes|login|cron)(\.php)?
RewriteRule . index.php [L]
56 views