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: no url change cause my rule must be bad Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
larry.dorman
Newbie
Newbie


Joined: 08 July 2008
Location: United States
Online Status: Offline
Posts: 2
Posted: 08 July 2008 at 4:07pm | IP Logged Quote larry.dorman

IIS 6.0 Windows 2003  PHP 5

Path:  c:\inetpub\wwwroot\d2h\

Testing with Version 3.0

 

Do you have to restart IIS after modifying the rule?

I have two map files.  One for categories(mapcat.txt) and one for products(mapprod.txt).

 

Current: http://www.domain.com/results.php?category=9

I would like:  http://www.domain.com/category/tshirts_adult.php

 

mapcat.txt

tshirts_adult          9

tshirts_youth        10

tshirts_junior        11

 

current: http://www.domain.com/details.php?prodId=26&category=10&secondary=&keywords=

I would like: http://www.domain.com/products/3:16_Number_Blue.php

 

mapprod.txt

3:16_Number_Blue            26

3:16_Number_Red             18

 

 

Here my rules basically copied right out of the examples

# Helicon ISAPI_Rewrite configuration file

# Version 3.1.0.51

 

RewriteEngine on

RewriteLogLevel 9

RewriteBase /

RewriteMap mapcat txt:mapcat.txt

RewriteRule ^category/([^?/]+)\.php /results.php?category=${mapcat:$1}

RewriteMap mapprod txt:mapprod.txt

RewriteRule ^products/([^?/]+)\.php /details.php?prodId=${mapprod:$1&category=10&secondary=&keywords=

 

No change in url

 

Log

127.0.0.1 127.0.0.1  Tue, 08-Jul-2008  15:33:45 GMT [www.domain.com/sid#695559][rid#19669224/initial] (2) init rewrite engine with requested uri /results.php

127.0.0.1 127.0.0.1  Tue, 08-Jul-2008  15:33:45 GMT [www.domain.com/sid#695559][rid#19669224/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf

127.0.0.1 127.0.0.1  Tue, 08-Jul-2008  15:33:45 GMT [www.domain.com/sid#695559][rid#19669224/initial] (3) applying pattern '^category/([^?/]+)\.php' to uri 'results.php'

127.0.0.1 127.0.0.1  Tue, 08-Jul-2008  15:33:45 GMT [www.domain.com/sid#695559][rid#19669224/initial] (3) applying pattern '^products/([^?/]+)\.php' to uri 'results.php'

127.0.0.1 127.0.0.1  Tue, 08-Jul-2008  15:33:47 GMT [www.domain.com/sid#695559][rid#19669224/initial] (2) init rewrite engine with requested uri /details.php

127.0.0.1 127.0.0.1  Tue, 08-Jul-2008  15:33:47 GMT [www.domain.com/sid#695559][rid#19669224/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf

127.0.0.1 127.0.0.1  Tue, 08-Jul-2008  15:33:47 GMT [www.domain.com/sid#695559][rid#19669224/initial] (3) applying pattern '^category/([^?/]+)\.php' to uri 'details.php'

127.0.0.1 127.0.0.1  Tue, 08-Jul-2008  15:33:47 GMT [www.domain.com/sid#695559][rid#19669224/initial] (3) applying pattern '^products/([^?/]+)\.php' to uri 'details.php'


Thank you in advance for helping me out with my rule issue!



Back to Top View larry.dorman's Profile Search for other posts by larry.dorman Visit larry.dorman's Homepage
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 3873
Posted: 09 July 2008 at 3:11am | IP Logged Quote Anton

Please try to use this config:

RewriteEngine on

RewriteLogLevel 9

RewriteBase /

RewriteMap mapcat txt:mapcat.txt

RewriteRule ^category/([^?/]+)\.php$ /results.php?category=${mapcat:$1}

RewriteMap mapprod txt:mapprod.txt

RewriteRule ^products/([^?/]+)\.php$ /details.php?prodId=${mapprod:$1}&category=10&secondary=&keywords=

And notice that you should request SEO-friendly url (like
http://www.domain.com/category/tshirts_adult.php) and you will be forwarded to http://www.domain.com/results.php?category=9

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


Joined: 08 July 2008
Location: United States
Online Status: Offline
Posts: 2
Posted: 09 July 2008 at 8:19am | IP Logged Quote larry.dorman

Thank you Anton,

My understanding on this stuff is backward.   I purchased a e-commerce solution that generates this type of url http://www.devoted2him.com/results.php?category=9 which I thought your software took that and made it look like this http://www.domain.com/category/tshirts_adult.php.  So, my application needs to generate friendly url to begin with. Am i still confused.

Your rule did work accept the images were missing and the css was not applied.  Those files are in different directories.

Back to Top View larry.dorman's Profile Search for other posts by larry.dorman Visit larry.dorman's Homepage
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 3873
Posted: 09 July 2008 at 8:58am | IP Logged Quote Anton

It would be better if you change the links on pages to SEO-friendly format, but after clicking in them you'll go to real "non-friendly" url.
Everything else may be left unchanged.


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

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