The page contains multiple canonical formats.
4 posts
• Page 1 of 1
- hetalpatel33
- Posts: 4
- Joined: 18 Feb 2013, 20:42
The page contains multiple canonical formats.
How to resolve the issue of "The page contains multiple canonical formats." using url rewrite.
I have used the url rewrite filter to make url user and seo friendly, but i come to know that google and bing don't like if same page access by different urls.
here is the multiple URL
1) http://www.14gaam.com/hindu-wedding-ceremony.htm
2) http://www.14gaam.com/parse.asp?ParseName=hindu-wedding-ceremony
Here is the script for URL rewrite.
RewriteCond Host:http://www.14gaam.co ^m$
RewriteRule ^/(.*)\.htm$ /parse.asp?ParseName=$1
What happen behind the scene.
When ever any user make request of page (eg hindu-wedding-ceremony.htm) It's check into url rewrite
and pass to the parse.asp as query string $1 (hindu-wedding-ceremony) and result the page without modifying URL
but even if you try to access page with URL (http://www.14gaam.com/parse.asp?ParseName=hindu-wedding-ceremony),
It is still accessible. What is the solution of it.
Thanks,
I have used the url rewrite filter to make url user and seo friendly, but i come to know that google and bing don't like if same page access by different urls.
here is the multiple URL
1) http://www.14gaam.com/hindu-wedding-ceremony.htm
2) http://www.14gaam.com/parse.asp?ParseName=hindu-wedding-ceremony
Here is the script for URL rewrite.
RewriteCond Host:http://www.14gaam.co ^m$
RewriteRule ^/(.*)\.htm$ /parse.asp?ParseName=$1
What happen behind the scene.
When ever any user make request of page (eg hindu-wedding-ceremony.htm) It's check into url rewrite
and pass to the parse.asp as query string $1 (hindu-wedding-ceremony) and result the page without modifying URL
but even if you try to access page with URL (http://www.14gaam.com/parse.asp?ParseName=hindu-wedding-ceremony),
It is still accessible. What is the solution of it.
Thanks,
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: The page contains multiple canonical formats.
Hello,
It seems like you did the first part of the job - rewrite, but now you need a 301-redirect back.
However, tell me first, what is your version of ISAPI_Rewrite? 2 or 3? The rule you provided looks more like 3.
Regards
Andrew
It seems like you did the first part of the job - rewrite, but now you need a 301-redirect back.
However, tell me first, what is your version of ISAPI_Rewrite? 2 or 3? The rule you provided looks more like 3.
Regards
Andrew
- hetalpatel33
- Posts: 4
- Joined: 18 Feb 2013, 20:42
Re: The page contains multiple canonical formats.
sorry for too late reply.
I can see the version i am using is 3.1.0.98.
below it the code for URL rewrite can help you understand the scenario.
Thanks,
# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.98
RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 200
RewriteBase
# ## 14gaam.com ####
RewriteCond %{HTTP:Host} ^(14gaam\.com)$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http://www.%1%2 [NC,R=301,L]
RewriteCond Host:http://www.14gaam.co ^m$
RewriteRule ^/(.*)\.htm$ /parse.asp?ParseName=$1
I can see the version i am using is 3.1.0.98.
below it the code for URL rewrite can help you understand the scenario.
Thanks,
# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.98
RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 200
RewriteBase
# ## 14gaam.com ####
RewriteCond %{HTTP:Host} ^(14gaam\.com)$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http://www.%1%2 [NC,R=301,L]
RewriteCond Host:http://www.14gaam.co ^m$
RewriteRule ^/(.*)\.htm$ /parse.asp?ParseName=$1
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: The page contains multiple canonical formats.
Hello,
The condition doesn't look good to me. Lets try to edit the existing rule and add a new rule:
Regards
Andrew
The condition doesn't look good to me. Lets try to edit the existing rule and add a new rule:
- Code: Select all
RewriteCond %{HTTP:Host} ^www\.14gaam\.com$
RewriteRule ^/([^.]+)\.htm$ /parse.asp?ParseName=$1 [NC,L]
RewriteCond %{HTTP:Host} ^www\.14gaam\.com$
RewriteCond %{QUERY_STRING} ^ParseName=(.+) [NC]
RewriteRule ^parse\.asp /%1.htm [NC,R=301,L]
Regards
Andrew
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 20 guests