Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: rewrite for ultimate seo, oscommerc (Topic Closed Topic Closed) Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Goodlives
Newbie
Newbie


Joined: 22 June 2009
Location: Netherlands
Online Status: Offline
Posts: 4
Posted: 22 June 2009 at 11:59am | IP Logged  

I'm trying to install ultimate seo urls for oscommerce on a windows server. My host has Isapi rewrite installed. I'm trying to rewrite the code from the .htacces file for the httpd. ini file, but it's not working. So I thing i'm doing it wrong.

original .htaccess code:

+FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

What I have so far:

UriMatchPrefix /catalog/
UriFormatPrefix /catalog/

# From Ultimate SEO URLs
RewriteRule ([^?]*)-p-([^?]*)\.html(?:\?(.*))? /product_info.php\?products_id=$2?3&$3{QUERY_STRING}[I,L]
RewriteRule ([^?]*)-c-([^?]*)\.html(?:\?(.*))? /index.php\?cPath=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-m-([^?]*)\.html(?:\?(.*))? /index.php\?manufacturers_id=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-pi-([^?]*)\.html(?:\?(.*))? /popup_image.php\?pID=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-t-([^?]*)\.html(?:\?(.*))? /articles.php\?tPath=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-a-([^?]*)\.html(?:\?(.*))? /article_info.php\?articles_id=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-pr-([^?]*)\.html(?:\?(.*))? /product_reviews.php\?products_id=$2&%?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-pri-([^?]*)\.html(?:\?(.*))? /product_reviews_info.php\?products_id=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-i-([^?]*)\.html(?:\?(.*))? /information.php\?info_id=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-links-([^?]*)\.html(?:\?(.*))? /links.php\?lPath=$2?3&$3{QUERY_STRING} [I,L] 

UriMatchPrefix
UriFormatPrefix

Oscommerce is installed in the root , the first directory is catalog and when you open the shop you get. http://www.claudiavandijk.com/catalog/index.php?language=en

I installed the httpd.ini file in the root of my site.

Can someone please help me, because I can't figure it out myself. Thanks

Back to Top View Goodlives's Profile Search for other posts by Goodlives Visit Goodlives's Homepage
 
Goodlives
Newbie
Newbie


Joined: 22 June 2009
Location: Netherlands
Online Status: Offline
Posts: 4
Posted: 23 June 2009 at 5:47am | IP Logged  

With the help of my host I have the following code for the httpd.ini  that is working for Ultimate SEO urls version 2.1e on Oscommerce:

[ISAPI_Rewrite]

UriMatchPrefix /catalog/
UriFormatPrefix /catalog/

# From Ultimate SEO URLs
RewriteRule ([^?]*)-p-([^?]*)\.html(?:\?(.*))? /product_info.php\?products_id=$2?3&$3{QUERY_STRING}[I,L]
RewriteRule ([^?]*)-c-([^?]*)\.html(?:\?(.*))? /index.php\?cPath=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-m-([^?]*)\.html(?:\?(.*))? /index.php\?manufacturers_id=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-pi-([^?]*)\.html(?:\?(.*))? /popup_image.php\?pID=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-t-([^?]*)\.html(?:\?(.*))? /articles.php\?tPath=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-a-([^?]*)\.html(?:\?(.*))? /article_info.php\?articles_id=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-pr-([^?]*)\.html(?:\?(.*))? /product_reviews.php\?products_id=$2&%?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-pri-([^?]*)\.html(?:\?(.*))? /product_reviews_info.php\?products_id=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-i-([^?]*)\.html(?:\?(.*))? /information.php\?info_id=$2?3&$3{QUERY_STRING} [I,L]
RewriteRule ([^?]*)-links-([^?]*)\.html(?:\?(.*))? /links.php\?lPath=$2?3&$3{QUERY_STRING} [I,L] 

UriMatchPrefix
UriFormatPrefix

Back to Top View Goodlives's Profile Search for other posts by Goodlives Visit Goodlives's Homepage
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 8080
Posted: 23 June 2009 at 8:30am | IP Logged  

{QUERY_STRING} is a garbage.

Use the following rules:

UriMatchPrefix /catalog/
UriFormatPrefix /catalog/

# From Ultimate SEO URLs
RewriteRule [^?]*-p-([^?]*)\.html(?:\?(.*))? /product_info.php\?products_id=$1?2&$2[I,L]
RewriteRule [^?]*-c-([^?]*)\.html(?:\?(.*))? /index.php\?cPath=$1?2&$2 [I,L]
RewriteRule [^?]*-m-([^?]*)\.html(?:\?(.*))? /index.php\?manufacturers_id=$1?2&$2 [I,L]
RewriteRule [^?]*-pi-([^?]*)\.html(?:\?(.*))? /popup_image.php\?pID=$1?2&$2 [I,L]
RewriteRule [^?]*-t-([^?]*)\.html(?:\?(.*))? /articles.php\?tPath=$1?2&$2 [I,L]
RewriteRule [^?]*-a-([^?]*)\.html(?:\?(.*))? /article_info.php\?articles_id=$1?2&$2 [I,L]
RewriteRule [^?]*-pr-([^?]*)\.html(?:\?(.*))? /product_reviews.php\?products_id=$1?2&$2 [I,L]
RewriteRule [^?]*-pri-([^?]*)\.html(?:\?(.*))? /product_reviews_info.php\?products_id=$1?2&$2 [I,L]
RewriteRule [^?]*-i-([^?]*)\.html(?:\?(.*))? /information.php\?info_id=$1?2&$2 [I,L]
RewriteRule [^?]*-links-([^?]*)\.html(?:\?(.*))? /links.php\?lPath=$1?2&$2 [I,L]
Back to Top View Lexey's Profile Search for other posts by Lexey
 
Goodlives
Newbie
Newbie


Joined: 22 June 2009
Location: Netherlands
Online Status: Offline
Posts: 4
Posted: 23 June 2009 at 4:12pm | IP Logged  

Thanks for the info.

I tried my site further, but I think this link is not right

RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
 which I changed into this:

RewriteRule [^?]*-i-([^?]*)\.html(?:\?(.*))? /information.php\?info_id=$1?2&$2 [I,L]

I think the part of the ([0-9]+ is not good. Do you know perhaps the good notation?

Back to Top View Goodlives's Profile Search for other posts by Goodlives Visit Goodlives's Homepage
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 8080
Posted: 24 June 2009 at 9:03am | IP Logged  

Use the following:

RewriteRule [^?]*-i-(\d+)\.html(?:\?(.*))? /information.php\?info_id=$1?2&$2 [I,L]
Back to Top View Lexey's Profile Search for other posts by Lexey
 
Goodlives
Newbie
Newbie


Joined: 22 June 2009
Location: Netherlands
Online Status: Offline
Posts: 4
Posted: 29 June 2009 at 9:01am | IP Logged  

That's not working. I changed it to

RewriteRule [^?]*-i-([0-9]+)\.html(?:\?(.*))? /information.php\?info_id=$1?2&$2 [I,L]

For now it's working

Back to Top View Goodlives's Profile Search for other posts by Goodlives Visit Goodlives's Homepage
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 8080
Posted: 30 June 2009 at 6:03am | IP Logged  

You have changed nothing in fact. \d is the same thing as [0-9].

BTW, change
UriFormatPrefix /catalog/
to the
UriFormatPrefix /catalog
Back to Top View Lexey's Profile Search for other posts by Lexey
 

Sorry, you can NOT post a reply.
This topic is closed.

  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