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
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 SEO friendly URL redirect
Next Page
Author « Topic »
Page: of 2

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 03/30/2017 :  01:15:12  
Hi,
I am using SEO friendly URL's, initially with an underscore, changed to a dash. Unfortunately google has picked up on the underscores & seems to still be getting them from somewhere that they seem not to exist, possibly a cache problem.

Is there a way to 301 redirect already redirected URL's to a new redirect? (e.g Redirect 301 /giftcertificates.php /giftcertificate.php)

If i use a normal 301 redirect as above I get both URL's tagged together with some ?prod=

Martin

Andy
ECT Moderator

95440 Posts

Posted - 03/30/2017 :  02:21:18  
Hi Martin

Can you give us a sample of what Google is reporting and what you have for the file name?

Andy

Please feel free to review / rate our software

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 03/31/2017 :  05:39:54  
I currently have 22 recent 'not found' , 404 errors, mostly with the underscore that i used for around 2 days more than 1 month ago. Most do not show any 'linked from' information but when it has done i can find nothing on the pages listed.

e.g. (with spaces to prevent further listing)

URL:
https:// extreme-body-jewellery.co.uk/Heaven_Belly_Bar

Error details

Last crawled: 3/29/17
First detected: 3/29/17

Real URL for last month though formerly http - https://extreme-body-jewellery.co.uk/Heaven-Belly-Bar

URL:
https:// extreme-body-jewellery.co.uk/Horn_Inlaid_Spiral_Flesh_Plug

Error details

Last crawled: 3/29/17
First detected: 3/29/17

Real URL for last month though formerly http - https://extreme-body-jewellery.co.uk/Horn-Inlaid-Spiral-Flesh-Plug

Martin

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 03/31/2017 :  05:43:07  
I have tried to redirect but it does not work with the following

Redirect 301 /Horn_Inlaid_Spiral_Flesh_Plug /Horn-Inlaid-Spiral-Flesh-Plug

Martin

Phil
ECT Moderator

United Kingdom
7711 Posts

Posted - 03/31/2017 :  06:22:44  
Hi Martin,
That's a little tricky to be honest due to the fact that the dynamic url's are already being rewritten.

Try it like this and see if it functions

RewriteCond %{QUERY_STRING} ^prod=Horn_Inlaid_Spiral_Flesh_Plug$
RewriteRule ^proddetail\.php$ https://extreme-body-jewellery.co.uk/Horn-Inlaid-Spiral-Flesh-Plug? [R=301,L]



* Database Migrations and Conversions*
* ASP to PHP Cart Conversions*

*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 03/31/2017 :  09:53:51  
Thanks Phil, that seems to work well. I am confused as to where google are getting the links from though & they are not specifying this. They say the links were found 2 days ago when the rewrite character was changed over a month ago, & only existed for 48 hrs.

Martin

Andy
ECT Moderator

95440 Posts

Posted - 03/31/2017 :  10:01:35  
Hi Martin

We still get a 404 error reported from a page that hasn't been available for over 10 years - I have no idea where it's coming from and why it pops up every 6 months or so. I did try tracking it down as it was bugging the hell out of me but with no luck I just live with it now.

Andy

Please feel free to review / rate our software

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 03/31/2017 :  13:38:33  

I've come to that conclusion too, that it's not really worth worrying about. It was just the fact that it was apparently first detected recently, long after that rewrite ever existed that was confusing. I'll divert some links with Phil's code & then try not to be irritated by the rest.

Thanks

Martin

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 04/16/2017 :  01:53:58  
Just in case anyone else is trying this, I am finding the rewrite rule above to be quite temperamental. It works with some links & not with others, with no obvious reason why.

Martin

Andy
ECT Moderator

95440 Posts

Posted - 04/16/2017 :  03:00:17  
It really should work with all - do you have any non-alphanumeric characters for example in the category / product names?

Andy

Please feel free to review / rate our software

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 04/19/2017 :  05:03:21  
some of the URL's that existed briefly & still need redirecting have under scores & sometimes a period / full stop .

One that will not seem to divert is:- /Bioflex_Clear_Barbell_1.6mm

It should dirt to : /Bioflex-Clear-Barbell-1.6mm

Martin

Andy
ECT Moderator

95440 Posts

Posted - 04/19/2017 :  05:39:20  
Can you try the troubleshooting here for the products with a period / full stop https://www.ecommercetemplates.com/seo/search-engine-friendly-urls-php.asp
quote:
If you have a product or category name with the decimal point / period / dot you can replace this line in the .htaccess file

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

with

RewriteCond $1 !\.(png|gif|jpg|ico|css|js|php)$ [NC]
RewriteRule ^([^/]+)$ proddetail.php?prod=$1 [QSA,nc,L,B]
Andy

Please feel free to review / rate our software

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 04/23/2017 :  04:04:47  
That is the same line that I am using in the .htaccess copied from ITZAP advice

Martin

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 04/23/2017 :  08:18:57  
It's not just the url's with points that won't divert, also e.g.

RewriteCond %{QUERY_STRING} ^prod=Black-Curved-Barbell-Cream-Synthetic-Pearl$
RewriteRule ^proddetail\.php$ https://extreme-body-jewellery.co.uk/Black-Curved-Barbell-Cream-faux-Pearls? [R=301,L]


Martin

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 05/06/2017 :  01:02:34  
Hi,

Just wondering if anyone has any further ideas on getting this rewrite to work, from old rewritten URL to new rewrite URL.

The code above works on 3 URL's so far but most do not work. e.g. i am trying to rewrite:-

/Bioflex-Clear-Nose-Piercing-Retainer to /Bioflex-Nose-Piercing-Retainer-Clear

Thanks

Martin

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 08/07/2018 :  07:06:50  
Hi,
Has anyone found a reliable way to redirect SEO friendly URL's ? The above ideas work with some URL's but not with most. It is proving difficult when i need to change a URL & cannot forward the old URL as the errors stack up with Google.

Thanks

Martin

Vince
Administrator

42853 Posts

Posted - 08/07/2018 :  09:39:19  
quote:
Just in case anyone else is trying this, I am finding the rewrite rule above to be quite temperamental. It works with some links & not with others
quote:
One that will not seem to divert is:- /Bioflex_Clear_Barbell_1.6mm
Would this be just because the "." is a special character in URL Rewriting. You need to escape it with a backslash normally like this...
/Bioflex_Clear_Barbell_1\.6mm

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

Steved
Ecommerce Template Guru

United Kingdom
1022 Posts

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

Posted - 08/07/2018 :  11:16:38  
Hi Martin,

Could well be the . as Vince suggests. Otherwise try this:

https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=109283&SearchTerms=Seo,friendly,solved

This sorted it completely for me.

Steve

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 08/07/2018 :  13:15:38  
Hi,
The character used for the mod rewrite space is "-". The redirect will not work when that is in the URL to be diverted. I have tried escaping it with \ but cannot get that to work.

e.g. This works
RewriteCond %{QUERY_STRING} ^prod=Bioflex_Nose_Stud_Retainer$
RewriteRule ^proddetail\.php$ https://extreme-body-jewellery.co.uk/Bioflex-Nose-Piercing-Retainer-Clear? [R=301,L]

This does not work:-
RewriteCond %{QUERY_STRING} ^prod=Titanium_Curved_Barbell_with_cones_1\.6mm$
RewriteRule ^proddetail\.php$ https://extreme-body-jewellery.co.uk/Titanium-Curved-Barbell-High-Polish-with-cones-1.6mm? [R=301,L]

This also does not work, with back slashes or without
RewriteCond %{QUERY_STRING} ^prod=Industrial-Barbell-Blue-Titanium$
RewriteRule ^proddetail\.php$ https://extreme-body-jewellery.co.uk/Industrial-Scaffold-Barbell-Blue-Titanium? [R=301,L]

It seems that URL's with either "-" and either "." or numbers prevent it working. I cannot tell if it is the "." or the number as every number also has "."



Martin

Vince
Administrator

42853 Posts

Posted - 08/08/2018 :  02:14:26  
quote:
This does not work:-
RewriteCond %{QUERY_STRING} ^prod=Titanium_Curved_Barbell_with_cones_1\.6mm$
RewriteRule ^proddetail\.php$ https://extreme-body-jewellery.co.uk/Titanium-Curved-Barbell-High-Polish-with-cones-1.6mm? [R=301,L]
Have you tried tests to see what character it is causing the problems? For instance try...


RewriteCond %{QUERY_STRING} ^prod=Test1$
RewriteRule ^proddetail\.php$ https://extreme-body-jewellery.co.uk/Test1? [R=301,L]

RewriteCond %{QUERY_STRING} ^prod=Test\.1$
RewriteRule ^proddetail\.php$ https://extreme-body-jewellery.co.uk/Test1? [R=301,L]

...and maybe even...

RewriteCond %{QUERY_STRING} ^prod=Test1$
RewriteRule ^proddetail\.php$ /Test1? [R=301,L]

This is what I would do anyway, go through a process of elimination to see if I can find exactly what is causing the problem.

Vince


Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

martinOV
Advanced Member

United Kingdom
427 Posts

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

Posted - 08/08/2018 :  09:54:08  
Thanks Vince, I will try testing more.

I have tried using the backslash before the number, the "." & the "-" as it seems to be a problem when one or all of these are present. When the only characters are letters & "_" it works

Martin
Page: of 2 « Topic »  
Next Page
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.04 seconds. Snitz Forums 2000