Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

xc seo url rewrite sending products with "print" in the title to printable page

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #1  
Old 10-30-2008, 10:40 AM
 
itsmeee itsmeee is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 56
 

Default xc seo url rewrite sending products with "print" in the title to printable page

Hey I just ran into a problem where if I have "print" in a products name the page the customer is sent to is the printable page which of course looks like the site just broke. I could go through and change each one in the admin but I'd rather not and I know there is a better solution.

My first idea was to go into the .htaccess and rewrite some of the rules, but I don't know how to change it properly. If anyone can help here is what I think is causing my problem (in particular the RewriteRule ^([^/]*/)?[^/]+-print-pr-([0-9]+)\.html$ rule)

Code:
# Rewrite SEO product URL's RewriteRule ^([^/]*/)?[^/]+-print-c-([0-9]+)-p-([0-9]+)-pr-([0-9]+)\.html$ $1product.php?printable=Y&productid=$4&cat=$2&page=$3 [QSA,L] RewriteRule ^([^/]*/)?[^/]+-c-([0-9]+)-p-([0-9]+)-pr-([0-9]+)\.html$ $1product.php?productid=$4&cat=$2&page=$3 [QSA,L] RewriteRule ^([^/]*/)?[^/]+-c-([0-9]+)-pr-([0-9]+)\.html$ $1product.php?productid=$3&cat=$2 [QSA,L] RewriteRule ^([^/]*/)?[^/]+-print-pr-([0-9]+)\.html$ $1product.php?printable=Y&productid=$2 [QSA,L] RewriteRule ^([^/]*/)?[^/]+-pr-([0-9]+)\.html$ $1product.php?productid=$2 [QSA,L]

My other idea was maybe I could go into the product section of the sql and replace any "print" to "prints" in the title of the products which I think I can do on my own. Will that work alright?
__________________
Version 4.1.8
Reply With Quote
  #2  
Old 10-30-2008, 10:58 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: xc seo url rewrite sending products with "print" in the title to printable page

Moving to Third Party Add-ons
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 10-30-2008, 11:14 AM
 
itsmeee itsmeee is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 56
 

Default Re: xc seo url rewrite sending products with "print" in the title to printable page

thanks
__________________
Version 4.1.8
Reply With Quote
  #4  
Old 10-30-2008, 11:25 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: xc seo url rewrite sending products with "print" in the title to printable page

If you don't use the printable pages, one option is to comment out the lines with "print" in your .htaccess file and remove the link for printable pages on your website.
Reply With Quote
  #5  
Old 10-31-2008, 10:50 AM
 
itsmeee itsmeee is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 56
 

Default Re: xc seo url rewrite sending products with "print" in the title to printable page

I don't so that works perfectly! Thanks
__________________
Version 4.1.8
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:46 PM.

   

 
X-Cart forums © 2001-2020