This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: Excluding a ling MOD_SEO
Author
Message |
Schira123
Newbie


Joined: 11 September 2008
Location: Australia
Posts: 15
Posted: 24 January 2011 at 9:03pm

Hi,

I am a beginner and am having problems excluding a link to a shopping cart from my SEORule;

I have the following working fine on my site

RewriteEngine on

DBDriver mssql
 include DBDParams
DBDParams "Data Source=OLBDB;Initial Catalog=OLBsites;User ID=User;Password=password"
DBDPrepareSQL "SELECT attr1 FROM Item WHERE productId [email protected]" getSeoInfo

SetEnv mod_seo

RewriteMap SeoInfo dbd:getSeoInfo
RewriteMap slug int:slug

SeoRule ProductDetails.aspx\?item_id=(\w+)$ \
        Product-$1-${slug:${SeoInfo:$1}}.html [Redirect,Scope=ALL]

RewriteRule Product-(\w+)-.*\.html$ ProductDetails.aspx\?item_id=$1 [NC,L,O]

This works great for pages such as:

http://serverguys.com.au/ProductDetails.aspx?item_id=466132011BDL

but I have Buy Now links on these pages I don't want to rewrite, they have the format :

http://www.serverguys.com.au/passu.aspx?url=https://secure.onlinebiz.com.au/shopping/Cart.aspx?action=purchaseItem%26itemId=447883B21&rURL=http://www.serverguys.com.au/ProductDetails.aspx?item_id=BY265

Could you please tell me how to exclude them , I have tried a number of things, but can't seem to get it right.

Thank you again,

Andrew

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 25 January 2011 at 2:43am

Please try to have it as follows:

SeoRule (?:[^?]*)ProductDetails.aspx\?item_id=(\w+)$ Product-$1-${slug:${SeoInfo:$1}}.html [Redirect,Scope=ALL]

__________________
Regards,
Anton
Back to Top
 
Schira123
Newbie


Joined: 11 September 2008
Location: Australia
Posts: 15
Posted: 25 January 2011 at 4:51am

Hi Anton,

I tried your suggestion, but it still converts ;

http://backupguys.com.au/passu.aspx?url=https://secure.onlinebiz.com.au/shopping/Cart.aspx?action=purchaseItem%26itemId=C7971A&rURL=http://backupguys.com.au/ProductDetails.aspx?item_id=EH853A

to

http://backupguys.com.au/Product-EH853A-HP_LTO4__ULTRIUM_1840_800gb-16tb_SCSI_INTERNAL_TAPE_DRIVE.html

Thanks,

Andrew

 

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 25 January 2011 at 6:52am

Please try it the following way:

SeoRule ^ProductDetails.aspx\?item_id=(\w+)$ Product-$1-${slug:${SeoInfo:$1}}.html [NC,Redirect,Scope=ALL]

__________________
Regards,
Anton
Back to Top
 
Schira123
Newbie


Joined: 11 September 2008
Location: Australia
Posts: 15
Posted: 26 January 2011 at 9:05pm

Hi Anton,

Thanks for you fast reply, but it is not redirecting at all now.

Regards,

Andrew



Edited by Schira123 - 26 January 2011 at 11:23pm
Back to Top
 
Schira123
Newbie


Joined: 11 September 2008
Location: Australia
Posts: 15
Posted: 26 January 2011 at 10:41pm

Hi Anton,

Sorry I spoke too soon, that doesn't redirect the urls' at all. Is it possible to restrict redirection if say a block like:

"passu.aspx?url=https://secure.onlinebiz.com.au/shopping/Cart.aspx?action"

is in the url?

You can see an example at:

http://backupguys.com.au/Product-EH853A-HP_LTO4__ULTRIUM_1840_800gb-16tb_SCSI_INTERNAL_TAPE_DRIVE.html and look at the "add to cart" buttons on the bottom right hand side of the page. They just redirect back to the same page.

Thanks again,
Andrew

 



Edited by Schira123 - 26 January 2011 at 11:39pm
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 27 January 2011 at 3:05am

Let's try it the following way:

SeoRule ^(?!.*passu\.aspx\?url=https\://secure\.onlinebiz\.com\.au/shopping/Cart\.aspx\?action.*).*ProductDetails.aspx\?item_id=(\w+)$
Product-$1-${slug:${SeoInfo:$1}}.html [Redirect,Scope=ALL]

__________________
Regards,
Anton
Back to Top
 
Schira123
Newbie


Joined: 11 September 2008
Location: Australia
Posts: 15
Posted: 27 January 2011 at 5:18am

Hi Anton,

I tried your latest suggestion but it didn't redirect the page at all.

Thanks again,

Andrew  

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 28 January 2011 at 4:54am

Please try to have it the following way:

SeoRule passu\.aspx\?url=https\://secure\.onlinebiz\.com\.au/shopping/Cart\.aspx\?action.* - [NC,L]
SeoRule ProductDetails.aspx\?item_id=(\w+)$ Product-$1-${slug:${SeoInfo:$1}}.html [Redirect,Scope=ALL]
RewriteRule Product-(\w+)-.*\.html$ ProductDetails.aspx\?item_id=$1 [NC,L]

__________________
Regards,
Anton
Back to Top
 
Schira123
Newbie


Joined: 11 September 2008
Location: Australia
Posts: 15
Posted: 31 January 2011 at 4:42pm

Hi Anton,

Thanks for your suggestion. It made thee buy now buttons link to http:\\www.mysite.com.au\\- instead.

Not to worry though, I made some changes to my original code and it all works ok now.

Regards,

Andrew

Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version