Page is a not externally linkable
agneslesage - 1:13 pm on Aug 9, 2010 (gmt 0)
OK guys
You've helped me so much and efficiently.
Just for the record, I'll put the code (if someone ever searches for similar, rather get it right)
###### PHP compatibility ######
AddType x-mapp-php5 .php
###### WordPress original code #####
# BEGIN WordPress
# <IfModule mod_rewrite.c>
# RewriteEngine On
# RewriteBase /
# RewriteRule ^index\.php$ - [L]
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule . /index.php [L]
# </IfModule>
# END WordPress
##### Wordpress Optimized code with my redirects ####
# Intro
RewriteEngine On
RewriteBase /
# My specific Redirect default.asp to WP Homepage
RewriteRule ^default\.asp$ http://www.example.com/ [R=301,L]
# My Specific Redirects from old site (.asp URLs containing ?string to WP+SEF-format URLs)
# Redirects template.asp?page=mystring containging "?page=mystring" and any other parameter to specified new URL www.example.com/mynewurl
# One may remove the "?" at the end of the target URL to keep parameters in the string.
RewriteCond %{QUERY_STRING} ^([^&]*&)*page=mystring(&.*)?$
RewriteRule ^template\.asp$ http://www.example.com/mynewurl/? [R=301,L]
# WP optimized code
# Redirect direct client requests for URL-path /index.php to / to avoid duplicate content
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php([?#][^\ ]*)?\ HTTP/
RewriteRule ^index\.php$ http://www.example.com/ [R=301,L]
# Redirect requests for non-blank, non-canonical hostnames to canonical hostname
RewriteCond %{HTTP_HOST} !^(www\.atable\.com)?$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
# Except for requests for /index.php and for the most-frequently-requested
# filetypes that WP cannot generate, rewrite all URL requests which do not
# resolve to an existing file or directory to the WordPress script filepath
RewriteCond $1 !^index\.php$
RewriteCond $1 !\.(gif|jpe?g|png|ico|css|js)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php [L]
# END WordPress