Forum Moderators: phranque
[edited by: jdMorgan at 5:57 pm (utc) on Feb 20, 2010]
[edit reason] example.com [/edit]
[edited by: jdMorgan at 5:58 pm (utc) on Feb 20, 2010]
[edit reason] example.com [/edit]
[edited by: jdMorgan at 5:59 pm (utc) on Feb 20, 2010]
[edit reason] example.com [/edit]
Deny from 77.88.24.0/22
#
RewriteEngine On
RewriteBase /
#
# Externally redirect specific "old" URLs to new ones
RewriteRule ^north-east-fishing-news/?$ http://www.example.com/category/fishing-news [R=301,L]
RewriteRule ^kayak-fishing/?$ http://www.example.com/category/kayak-fishing [R=301,L]
RewriteRule ^kayak-fishing-reviews/?$ http://www.example.com/category/kayak-reviews [R=301,L]
RewriteRule ^kayak-launch-sites/?$ http://www.example.com/category/kayak-fishing/kayak-launch-sites [R=301,L]
RewriteRule ^fishing-tackle-reviews/?$ http://www.example.com/category/fishing-tackle [R=301,L]
#
# Externally redirect [b]only[/b] direct client requests for old ".php" URLs to new extensionless URLs
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/]+/)*[^.]+\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^(([^/]+/)*[^.]+)\.php$ http://www.example.com/$1 [R=301,L]
#
# Last external redirect - Redirect all non-canonical hostname requests to canonical hostname
RewriteCond %{HTTP_HOST} example\.com [NC]
RewriteCond %{HTTP_HOST} !^www\.example\.com$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
#
# Optimized internal rewrite to WordPress script
# Exclude index.php itself from the file- and directory-exists check
RewriteCond $1 !^index\.php$
#
# NOTICE: Use only one or the other of the following RewriteConds. The first is most efficient, but
# you may need to use the more-specific second RewriteCond if your site won't work with the first.
#
# Exclude any requested URL ending with a filetype from the "exists" checks
RewriteCond $1 !^\.[a-z0-9]+$
# Exclude specific filetypes from the "exists" checks
RewriteCond $1 !^\.(gif|jpe?g|css|js|png|ico)$
# Read the disk to see if the requested URL resolves to an existing file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*[^/])$ /index.php [L]
# END WordPress
[edited by: jdMorgan at 4:06 am (utc) on Feb 22, 2010]