X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   xc seo url rewrite sending products with "print" in the title to printable page (https://forum.x-cart.com/showthread.php?t=43346)

itsmeee 10-30-2008 10:40 AM

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?

balinor 10-30-2008 10:58 AM

Re: xc seo url rewrite sending products with "print" in the title to printable page
 
Moving to Third Party Add-ons

itsmeee 10-30-2008 11:14 AM

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

Jon 10-30-2008 11:25 AM

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.

itsmeee 10-31-2008 10:50 AM

Re: xc seo url rewrite sending products with "print" in the title to printable page
 
I don't so that works perfectly! Thanks :)


All times are GMT -8. The time now is 04:11 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.