Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: Some help needed Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 16 May 2008 at 6:53am | IP Logged Quote Bender

Hi

I'm new to ISAPI 3 and I'm not sure if I correctly understoot the rewriting idea. I've got a country list

Amerika
Argentinien
Australien
...

With links

/shop/biere/land.asp?HERKUNFTLAND_ID=17
/shop/biere/land.asp?HERKUNFTLAND_ID=18
/shop/biere/land.asp?HERKUNFTLAND_ID=19
...

Now I'd like to make these links search-engine friendly. Is it right that I've got to change the links in my country links to for example to:

/shop/biere/Amerika-17.html

but leaving the original land.asp page on the server? Is the following rewrite rule correct:

RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 200
RewriteBase /
# unsupported directive: [ISAPI_Rewrite]

# Biere Landauswahl
^shop/biere/.*-([0-9]+)\.html$ shop/biere/land.asp?HERKUNFTLAND_ID=$1 [NC,L]

Thanks for any help in advance!








Back to Top View Bender's Profile Search for other posts by Bender
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4146
Posted: 19 May 2008 at 3:24am | IP Logged Quote Anton

Here's the config you need:

RewriteEngine On
RewriteBase /
# Biere Landauswahl
RewriteRule ^shop/biere/\w+-(\d+)\.html$ shop/biere/land.asp?HERKUNFTLAND_ID=$1 [NC,L]


__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 19 May 2008 at 4:22am | IP Logged Quote Bender

Thanks, works perfect :)
Back to Top View Bender's Profile Search for other posts by Bender
 
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 19 May 2008 at 5:51am | IP Logged Quote Bender

I encountered a Problem with white spaces. How do I handle countries like "South Afrika"?
Back to Top View Bender's Profile Search for other posts by Bender
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6455
Posted: 19 May 2008 at 8:04am | IP Logged Quote Yaroslav

RewriteEngine On
RewriteBase /
# Biere Landauswahl
RewriteRule ^shop/biere/[^/]+-(\d+)\.html$ shop/biere/land.asp?HERKUNFTLAND_ID=$1 [NC,L]

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 19 May 2008 at 8:21am | IP Logged Quote Bender

Thanks a lot! What an excellent support!

But I encounter now a problem with

RewriteRule ^shop/biere/[^/]+-(\d+)-[^/]+-(\d+)-[^/]+-(\d+)\.html$ shop/biere/details_test.asp?HERKUNFTLAND_ID=$1&PRODUZENT_ID=$2&ArtikelNr=$3 [NC,L]

That doesn't work anymore ...

Edited by Bender - 19 May 2008 at 8:24am
Back to Top View Bender's Profile Search for other posts by Bender
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4146
Posted: 20 May 2008 at 1:48am | IP Logged Quote Anton

This config should work for you:

RewriteEngine On
RewriteBase /
# Biere Landauswahl
RewriteRule ^shop/biere/[^/-]+-(\d+)\.html$ shop/biere/land.asp?HERKUNFTLAND_ID=$1 [NC,L]
RewriteRule ^shop/biere/[^/-]+-(\d+)-[^/-]+-(\d+)-[^/-]+-(\d+)\.html$ shop/biere/details_test.asp?HERKUNFTLAND_ID=$1&PRODUZENT_ID=$2&ArtikelNr=$3 [NC,L]


__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 20 May 2008 at 4:55am | IP Logged Quote Bender

Works perfect! Thx
Back to Top View Bender's Profile Search for other posts by Bender
 
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 20 May 2008 at 11:00am | IP Logged Quote Bender

It looks like the devil is in the detail ...

How can I mask "-" that are inside words (El-Torro)?

www.xyz.com/shop/biere/Argentina-17-El-Torro-34-Best Wine-324.html

RewriteRule ^shop/biere/[^/]+-(\d+)-[^/]+-(\d+)-[^/]+-(\d+)\.html$ shop/biere/details_test.asp?HERKUNFTLAND_ID=$1&PRODUZENT_ID=$2&ArtikelNr=$3 [NC,L]

Thanks again for any help!

Edited by Bender - 20 May 2008 at 11:00am
Back to Top View Bender's Profile Search for other posts by Bender
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4146
Posted: 21 May 2008 at 3:56am | IP Logged Quote Anton

The rule you provided in your last post should work for www.xyz.com/shop/biere/Argentina-17-El-Torro-34-Best Wine-324.html correctly.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 21 May 2008 at 3:56am | IP Logged Quote Bender

It's not working, maybe the problem is somewhere else?

Please have a look at the page:

http://www.ullrich.ch/shop/whisky/Whiskylik%F6r-92.html

And click on one of the products with a "-" in its name.

The rule is also not working for names like

Single Malt "M"

I'm using the following rule:

# Whisky Land/Region/Produzent/ArtikelNr
RewriteRule ^shop/whisky/[^/-]+-(\d+)-[^/-]+-(\d+)-[^/-]+-(\d+)-[^/-]+-(\d+)\.html$ shop/whisky/details.asp?HERKUNFTLAND_ID=$1&HERKUNFTREGION_ID=$2&PRODUZENT_ID=$3&ArtikelNr=$4 [NC,L]



Edited by Bender - 21 May 2008 at 5:12am
Back to Top View Bender's Profile Search for other posts by Bender
 
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 22 May 2008 at 2:44am | IP Logged Quote Bender

How do I rewrite the ArtikelNr if it's like 21340.1 instead of a number without a point?

Back to Top View Bender's Profile Search for other posts by Bender
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4146
Posted: 22 May 2008 at 5:51am | IP Logged Quote Anton

Please try to use this rule:

RewriteRule ^shop/whisky/[^/-]+-(\d+)-[^/-]+-(\d+)-[^/-]+-(\d+)-[^/]+-([^/-]+)\.html$ shop/whisky/details.asp?HERKUNFTLAND_ID=$1&HERKUNFTREGION_ID=$2&PRODUZENT_ID=$3&ArtikelNr=$4  [L,NC]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 22 May 2008 at 6:32am | IP Logged Quote Bender

Thx Anton

I still got the problem that the rewriting is not working when a word contains a -

Back to Top View Bender's Profile Search for other posts by Bender
 
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 22 May 2008 at 8:59am | IP Logged Quote Bender

Words like

Single Malt Cask No. 687 bot. 90/151 Signatory

Also don't work
Back to Top View Bender's Profile Search for other posts by Bender
 
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 23 May 2008 at 2:40am | IP Logged Quote Bender

I still need some help with rewriting words containing

white spaces an/or -

when using the following rules:

# Whisky Land/Region/Produzent/ID_NR_Art
RewriteRule ^shop/whisky/[^/-]+-(\d+)-[^/-]+-(\d+)-[^/-]+-(\d+)-[^/-]+-(\d+)\.html$ shop/whisky/details.asp?HERKUNFTLAND_ID=$1&HERKUNFTREGION_ID=$2&PRODUZENT_ID=$3&ID_NR_Art=$4 [NC,L]

Example link to be rewritten:

shop/whisky/Whiskylikor-92-Alle-4-Marlfield-1221-Old Irish Whiskey-Likor-17729.html

Might it help switching from - to some other letter as separator? I tried different rules and all of them fail because of the - in the articles name.




Edited by Bender - 23 May 2008 at 3:28am
Back to Top View Bender's Profile Search for other posts by Bender
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4146
Posted: 23 May 2008 at 8:57am | IP Logged Quote Anton

It's not likely to have - for parameters separation and - inside parameters, it's difficult to distinguish them. Please try to change one of separators.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Bender
Newbie
Newbie


Joined: 09 November 2004
Location: Switzerland
Online Status: Offline
Posts: 26
Posted: 24 May 2008 at 2:37am | IP Logged Quote Bender

# Whisky Land/Region/Produzent/ID_NR_Art ~
RewriteRule ^shop/whisky/[^/~]+~(\d+)~[^/~]+~(\d+)~[^/~]+~(\d+)~[^/~]+~(\d+)\.html$ shop/whisky/details.asp?HERKUNFTLAND_ID=$1&HERKUNFTREGION_ID=$2&PRODUZENT_ID=$3&ID_NR_Art=$4 [NC,L]

Seems to work so far ...

Edited by Bender - 24 May 2008 at 3:08am
Back to Top View Bender's Profile Search for other posts by Bender
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum