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: newbie question - not sure what is wrong Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
printpapa
Newbie
Newbie


Joined: 15 August 2008
Online Status: Offline
Posts: 6
Posted: 18 August 2008 at 1:16am | IP Logged Quote printpapa

lets say my website files are physically located at c:\website\angithi

I have a page which is like http://www.angithi.com/eshop/pc/configurePrd.asp?idproduct=123  which I want to show as

http://www.angithi.com/eshop/pc/chicken_curry_123.asp

Any help will be appreciate. The site is hosted on a VPS and is the only site hosted. Also i am currently installed the free lite version 3.0

Thanks for your help. I did spent a lot of time before I posted this. I checked the example which is exactly like the above. But somehow I think the RewriteBase is causing problems.

Thanks

Shawn

Back to Top View printpapa's Profile Search for other posts by printpapa
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 18 August 2008 at 5:06am | IP Logged Quote Vyacheslav

Hi.
Please try these rules:
Code:
RewriteBase /
RewriteRule ^eshop/pc/chicken_curry_(\d+)\.asp$ eshop/pc/configurePrd.asp?idproduct=$1 [NC,L]


__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
printpapa
Newbie
Newbie


Joined: 15 August 2008
Online Status: Offline
Posts: 6
Posted: 18 August 2008 at 8:37pm | IP Logged Quote printpapa

It worked. Thanks a lot..

Different problem now ---

 I did more testing and now using a map file to map a specific name to a particular url. See below:

httpd.conf file contains:

RewriteEngine on

RewriteBase /

RewriteMap mapfile txt:mapfile.txt

RewriteRule ^eshop/pc/([^?/]+)\.asp eshop/pc/configurePrd.asp?idproduct=${mapfile:$1} [NC,QSA]

================================

mapfile.txt contains just one line

full_color_business_cards 587

===============================

So the following url works :

http://www3.printpapa.com/eshop/pc/full_color_business_cards.asp

but if  you click on any other link it does not work or it hangs up. Seems like it goes in some loop. As soon I comment the code it comes back again. Any idea why? Tried all the directives like [L], but still does not respond.

Thanks in advance for the help.

Shawn

So if you type in



Edited by printpapa - 18 August 2008 at 8:38pm
Back to Top View printpapa's Profile Search for other posts by printpapa
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4701
Posted: 19 August 2008 at 6:44am | IP Logged Quote Anton

Please try to correct your config like this:

RewriteEngine on

RewriteBase /

RewriteMap mapfile txt:mapfile.txt

RewriteMap lower int:tolower

RewriteCond ${mapfile:${lower:$1}|NOT_FOUND} !NOT_FOUND

RewriteRule ^eshop/pc/([^?/]+)\.asp eshop/pc/configurePrd.asp?idproduct=${mapfile:$1} [NC,QSA]



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


Joined: 15 August 2008
Online Status: Offline
Posts: 6
Posted: 19 August 2008 at 4:26pm | IP Logged Quote printpapa

Thanks Anton, It worked. I will try to go through the help and understand the code.

Shawn

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


Joined: 15 August 2008
Online Status: Offline
Posts: 6
Posted: 25 August 2008 at 4:41pm | IP Logged Quote printpapa

For some reason - it is getting hung up when the person is trying to checkout - right on the credit card payment page. We use the Paypal Verisign Payflow and seems like the transaction is going through but the response is not getting acknowledged back to the server due to which the page remains in that position. I disabled the reqrite and everything is working fine.

I was just wondering is there is a way to make the rewrite only work on the specified rule and let everything else pass through?

There is only one page which I need to reqrite i.e. the configurePrd.asp as of now - is there any way to hard code this so that no other page gets rewritten.

As of now I cannot use the rewrite till some workaround is done.

Thanks

Shawn

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


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4701
Posted: 26 August 2008 at 5:02am | IP Logged Quote Anton

Please try to change your rule like this:

RewriteRule ^eshop/pc/(
configurePrd)\.asp eshop/pc/configurePrd.asp?idproduct=${mapfile:$1} [NC,QSA]

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


Joined: 15 August 2008
Online Status: Offline
Posts: 6
Posted: 26 August 2008 at 1:34pm | IP Logged Quote printpapa

Now it is not working at all, below is what I currently have in my config file. 

# Helicon ISAPI_Rewrite configuration file

# Version 3.1.0.55

RewriteEngine on

RewriteBase /

RewriteMap mapfile txt:mapfile.txt

RewriteMap lower int:tolower

RewriteCond ${mapfile:${lower:$1}|NOT_FOUND} !NOT_FOUND

RewriteRule ^eshop/pc/(configurePrd)\.asp eshop/pc/configurePrd.asp?idproduct=${mapfile:$1} [NC,QSA]

 

Also for some strange reason - earlier the following link was working fine -

http://www.printpapa.com/eshop/pc/full_color_business_cards.asp

BUT the following link was not:

http://www.printpapa.com/eshop/pc/Doorhangers_large.asp

I found out that if I change the D of Doorhanger from upper case to lower case in the URL and in the mapfile.txt it works.

Any ideas. Thanks Shawn

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


Joined: 15 August 2008
Online Status: Offline
Posts: 6
Posted: 26 August 2008 at 2:24pm | IP Logged Quote printpapa

I finally had to remove it from my production server as there were lots of places where the server would stop responding and will just hang up. I wanted to use this badly but seems like it is causing problems.

 

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


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4701
Posted: 27 August 2008 at 3:47am | IP Logged Quote Anton

In my last answer I provided you the rule according to your requirement but it seems to be out of the config logic.
Your config should look like:

RewriteEngine on

RewriteBase /

RewriteMap mapfile txt:mapfile.txt

RewriteMap lower int:tolower

RewriteCond ${mapfile:${lower:$1}|NOT_FOUND} !NOT_FOUND

RewriteRule ^(?!configurePrd)eshop/pc/([^./]+)\.asp$ eshop/pc/configurePrd.asp?idproduct=${mapfile:$1} [NC,QSA]

And as for the lower case in map file: your rules are written in a way that transforms all requested urls to lower case, thus urls in map file should also be lower case.


__________________
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 can vote in polls in this forum