Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Author « Topic »  

iaind
Advanced Member

145 Posts

Pre-sales questions only
(More Details...)

Posted - 10/07/2019 :  04:39:03  
Hi

I have an URL https://www.xxxxxx.co.uk/Beech-Hill-House-B%26B that I need to redirect to https://www.xxxxxx.co.uk/Beech-Hill-House but I have the SEO friendly URL's and can't seem to get it to redirect via htaccess. Any help would be appreciated.

Thanks

Steved
Ecommerce Template Guru

United Kingdom
1022 Posts

Pre-sales questions only
(More Details...)

Posted - 10/07/2019 :  05:11:40  
Hi - this should work:

RewriteRule ^Beech\-Hill\-House\-B%26B$ /Beech\-Hill\-House? [L,R=301]

Make sure it goes before the ect friendly seo commands.


It's possible the %26 might cause a problem. If so, give this a try:

RewriteRule ^Beech\-Hill\-House\-B&B$ /Beech\-Hill\-House? [L,R=301]

(Also, make sure RewriteEngine On appears somewhere before the redirect)

Steve

Edited by - Steved on 10/07/2019 05:15:03

iaind
Advanced Member

145 Posts

Pre-sales questions only
(More Details...)

Posted - 10/07/2019 :  05:31:53  
Brilliant - thank you. It was the second one that did it :)

Steved
Ecommerce Template Guru

United Kingdom
1022 Posts

Pre-sales questions only
(More Details...)

Posted - 10/07/2019 :  06:24:54  
No problem - glad it's sorted.

Steve

stonewx
Starting Member

31 Posts

Pre-sales questions only
(More Details...)

Posted - 10/17/2019 :  14:12:48  
I have a similar issue. We have seo friendly urls installed but have to have an & symbol in the product name. How can I rewrite the product detail page to one which doesn't have the & symbol converted to %26?

In fact if I could convert #() to nothing, that would be great!
For example a product name of A&M stone goes to A%26M-stone detail page. I'd like it to be am-stone or a-m-stone but still display the correct product name on the page.

My current htaccess rewrites are:
[code]<IfModule mod_rewrite.c>

RewriteBase /

RewriteRule ^stone-category/([^/.]*)?$ /categories.php?cat=$1 [QSA,nc,L,B]

RewriteRule ^stone-products/([^/.]*)?$ /products.php?cat=$1 [QSA,nc,L,B]

#RewriteRule ^manufacturer/([^/.]*)/?$ /products.php?man=$1 [QSA,nc,L,B]

#RewriteCond $1 !\.(png|gif|jpg|ico|pdf|css|js|php|xml|html|htm)$ [NC]

RewriteRule ^([^/.]+)$ proddetail.php?prod=$1 [QSA,nc,L,B]

</IfModule>[/code]

Thanks in advance!

Steved
Ecommerce Template Guru

United Kingdom
1022 Posts

Pre-sales questions only
(More Details...)

Posted - 10/17/2019 :  23:41:47  
Hi,

Just a thought - if the product is fairly new and you feel it doesn’t hold too much seo value yet, it may be easier in the product admin page to select Has Static URL and simply enter what you want there.

For example, if your product name is A&M Stone, you could enter a m stone in the ‘has static url’ box which would display a-m-stone at the end of the URL. Make sure you use spaces between each character. or word in the ‘has static url’ box.

I prefer this method when creating new products so I can use special characters in the Product Name but set the URL suffix in ‘Has Static URL’.

Just be careful if you then clone a product as a starting point for an additional product as you’ll obviously need to set a different URL !

Steve

stonewx
Starting Member

31 Posts

Pre-sales questions only
(More Details...)

Posted - 10/18/2019 :  08:45:22  
Thanks Steve... I'd considered that and will do some testing but I'm running into admins adding parentheses and # signs...if I could figure out how to do a rewrite that would be ideal.

I appreciate your reminder of the static page feature though!

Thank you,
Lynne

Steved
Ecommerce Template Guru

United Kingdom
1022 Posts

Pre-sales questions only
(More Details...)

Posted - 10/18/2019 :  10:10:38  
Hi Lynne,

In your example, to rewrite A&M stone to am-stone I think would be this:

RewriteRule ^A&M\-stone$ /am\-stone? [L,R=301]

Make sure it goes before the ect friendly seo commands.
Make sure RewriteEngine On appears somewhere before the redirect

You can probably work out other url rewrites from this but if not paste them here.
I'm afraid I don't know if there's a global way to change special characters though.

Unfortunately it is a problem with the seo friendly feature as non techie admins will not realise that certain characters in the Product Name mess with the system.

I must admit, with my most recent site I decided not to implement this feature for this very reason.

Steve

Edited by - Steved on 10/18/2019 11:07:57

insight
ECT Moderator

USA
4476 Posts

Posted - 10/18/2019 :  11:32:37  
Small point, I don't believe you need to escape the hyphens in your examples

Peter


Professional ecommerce web hosting services
Shared hosting Windows & Linux | Dedicated servers | Domains | SSL
Ecommerce Templates specialists since 2003
https://servelink.com
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000