Rewriting url bar

Helicon Ape provides support for Apache .htacces and .htpasswd configuration files for Microsoft IIS.
User avatar
Posts: 14
Joined: 11 Jun 2014, 10:50

Rewriting url bar

27 Aug 2014, 12:12

Hi to all!

I've a issue regarding url bar.

I've done a seo/rewrite rule written this way:

***SeoRule Catalog\.asp\?IdProduct=([0-9]+) /Catalog/Product-$1.html [Redirect]

***Rewriterule Catalog\/Product-([0-9]+)\.html /Catalog.asp?IdProduct=$1

This work fine if i am in the site and i click onto the link of product. If i manually copy a link like this

***www.mysite.com/Catalog.asp?IdProduct=50

onto the url bar and press enter, the url doesn't change in

***www.mysite.com/Catalog/Product-50.html

but remains the same.

I've read into the mod_seo documentation that the [Redirect] flag should perform redirection to SEO-friendly link to avoid duplicate content penalty. It's possible that i've done something wrong? It's possible to have this behaviour?

Thank you very much!

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Rewriting url bar

27 Aug 2014, 21:58

This is strange, if it works, it should work for any request.
Could you, please, provide rewrite.log for the testing request. Logging issues are described in FAQ - https://www.helicontech.com/ape/doc/troubleshooting.htm

Regards

User avatar
Posts: 14
Joined: 11 Jun 2014, 10:50

Re: Rewriting url bar

29 Aug 2014, 10:07

The rewrite.log file is a little bit long, about 34 rows. I've omitted parts of the file that includes ip address and domain. Can I post here or you prefer an external link (like mega)?

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Rewriting url bar

29 Aug 2014, 12:31

Anything will work. You can post it here and I'll remove it after we finished and just leave a comment for others, so that they know what the issue is.

Regards

User avatar
Posts: 14
Joined: 11 Jun 2014, 10:50

Re: Rewriting url bar

29 Aug 2014, 12:41

Here it is!

init rewrite engine with /ITA/Porte-Blindate/Linea-Synua-21006.html
strip matching prefix: /ITA/Porte-Blindate/Linea-Synua-21006.html -> ITA/Porte-Blindate/Linea-Synua-21006.html
applying pattern ITA\/([A-Za-z-]+)\/([A-Za-z0-9\-]+)-([0-9]+)\.html$ to uri ITA/Porte-Blindate/Linea-Synua-21006.html
Rewrite URL to >> /ITA/altro/Catalogo_prodotto.asp?IdProduct=21006 [REWRITE]
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp?IdProduct=21006 -> ITA/altro/Catalogo_prodotto.asp?IdProduct=21006
applying pattern ITA\/([A-Za-z0-9-]+)-([0-9]+)\.html$ to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp?IdProduct=21006 -> ITA/altro/Catalogo_prodotto.asp?IdProduct=21006
applying pattern ([\/a-zA-Z0-9]+)\/([a-zA-Z0-9_-]+).jpg([0-9]+)x([0-9]+)$ to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp?IdProduct=21006 -> ITA/altro/Catalogo_prodotto.asp?IdProduct=21006
applying pattern ([\/a-zA-Z0-9]+)\/([a-zA-Z0-9_-]+).jpg([0-9]+)x([0-9]+)q$ to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp?IdProduct=21006 -> ITA/altro/Catalogo_prodotto.asp?IdProduct=21006
applying pattern ([a-zA-Z0-9_\/]+)\/([0-9]+)\/([a-zA-Z0-9_]+)\.jpg([0-9]+)x([0-9]+)b to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp?IdProduct=21006 -> ITA/altro/Catalogo_prodotto.asp?IdProduct=21006
applying pattern Immagini\/Gallery\/Big\/3\/([a-zA-Z0-9_.]*) to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp?IdProduct=21006 -> ITA/altro/Catalogo_prodotto.asp?IdProduct=21006
applying pattern (.+?)([a-zA-Z0-9_-]+)-([0-9]+)-([0-9]+)\.jpg$ to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp?IdProduct=21006 -> ITA/altro/Catalogo_prodotto.asp?IdProduct=21006
applying pattern ^(.+)\.html(.*)$ to uri ITA/altro/Catalogo_prodotto.asp
Rewrite URL /ITA/Porte-Blindate/Linea-Synua-21006.html to >> /ITA/altro/Catalogo_prodotto.asp [INTERNAL_REDIRECT]
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp -> ITA/altro/Catalogo_prodotto.asp
applying pattern ITA\/([A-Za-z-]+)\/([A-Za-z0-9\-]+)-([0-9]+)\.html$ to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp -> ITA/altro/Catalogo_prodotto.asp
applying pattern ITA\/([A-Za-z0-9-]+)-([0-9]+)\.html$ to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp -> ITA/altro/Catalogo_prodotto.asp
applying pattern ([\/a-zA-Z0-9]+)\/([a-zA-Z0-9_-]+).jpg([0-9]+)x([0-9]+)$ to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp -> ITA/altro/Catalogo_prodotto.asp
applying pattern ([\/a-zA-Z0-9]+)\/([a-zA-Z0-9_-]+).jpg([0-9]+)x([0-9]+)q$ to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp -> ITA/altro/Catalogo_prodotto.asp
applying pattern ([a-zA-Z0-9_\/]+)\/([0-9]+)\/([a-zA-Z0-9_]+)\.jpg([0-9]+)x([0-9]+)b to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp -> ITA/altro/Catalogo_prodotto.asp
applying pattern Immagini\/Gallery\/Big\/3\/([a-zA-Z0-9_.]*) to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp -> ITA/altro/Catalogo_prodotto.asp
applying pattern (.+?)([a-zA-Z0-9_-]+)-([0-9]+)-([0-9]+)\.jpg$ to uri ITA/altro/Catalogo_prodotto.asp
strip matching prefix: /ITA/altro/Catalogo_prodotto.asp -> ITA/altro/Catalogo_prodotto.asp
applying pattern ^(.+)\.html(.*)$ to uri ITA/altro/Catalogo_prodotto.asp

User avatar
Posts: 14
Joined: 11 Jun 2014, 10:50

Re: Rewriting url bar

02 Sep 2014, 04:15

Any suggestion? Please, I'm desperate!

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Rewriting url bar

02 Sep 2014, 09:36

Well.... I assume the log you provided is for the one that is requested from a browser.
I see that the following rule has been applied first:

applying pattern ITA\/([A-Za-z-]+)\/([A-Za-z0-9\-]+)-([0-9]+)\.html$ to uri ITA/Porte-Blindate/Linea-Synua-21006.html
Rewrite URL to >> /ITA/altro/Catalogo_prodotto.asp?IdProduct=21006 [REWRITE]


It didn't match Catalog\.asp\?IdProduct=([0-9]+)

Could this be an issue? So that the URL doesn't make it through to the intended rule.
For more info, email us your rules, logs and examples.

Regards

User avatar
Posts: 14
Joined: 11 Jun 2014, 10:50

Re: Rewriting url bar

05 Sep 2014, 09:16

Ok, I'll prepare the .zip file to send to you. What is the address should I send it? Thank you!

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Rewriting url bar

05 Sep 2014, 10:06

Yuo just create a ticket here - https://www.helicontech.com/support/
Or email support at helicontech.

Regards

Return to Helicon Ape

Who is online

Users browsing this forum: No registered users and 0 guests