Page is a not externally linkable
agneslesage - 4:28 pm on Aug 6, 2010 (gmt 0)
[edited by: jdMorgan at 5:58 pm (utc) on Aug 6, 2010]
Hi
This forum is magic... great people!
Now, I ve put the code with "query string contains" option.
And it seems to work:my 301 redirect instruction is no more ignored), but for some reason the original string is appended as it redirects to:
[atable.com...]
Which... may not be really a problem, though I'd rather remove it.
On the other hand, if there is some other parameters from Google Analytics and Adwords, I am rather happy to keep the string...
So I wonder if there is a way to remove that original URL string (that can be "page=qui_nous" or "page=qui_nous&titre=qui_nous"), and keep any other parameter, I'd be 110% satisfied.
If not, I am still very happy with the above solution.
Thanks!
Agnes
##### New code ####
#
RewriteEngine On
RewriteBase /
#
# Redirect specific .asp URLs to WP+SEF-format URLs
RewriteCond %{QUERY_STRING} ^([^&]*&)*page=qui_nous(&.*)?$
RewriteRule ^template\.asp$ http://www.atable.com/qui-sommes-nous/ [R=301,L]
#
# 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.atable.com/ [R=301,L]
#
# Redirect requests for non-blank, non-canonical hostnames to canonical hostname
RewriteCond %{HTTP_HOST} !^(www\.atable\.com)?$
RewriteRule ^(.*)$ http://www.atable.com/$1 [R=301,L]
#
# BEGIN WordPress
# 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
[edit reason] Added code tags for formatting. [/edit]