This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: Going from ISAPI Rewrite to APE help
Author
Message |
claydough
Newbie


Joined: 02 February 2006
Posts: 4
Posted: 25 February 2011 at 12:06pm

I am converting a directive from ISAPI Rewrite to APE and having big
issues...mostly because I'm a newb. I have tried to do this, but just can't
get it.

So what I need to do is convert this URL:

http://www.domain.com/vehicles/auto_transport/chevy/

to call this script:

http://www.domain.com/vehicles/includes/etc/master.php?
href=/auto_transport/chevy

Here is the old rule:

RewriteRule /vehicles((/car_shipping|/auto_shipper|/auto_transport).+)/
/vehicles/includes/etc/master.php?href=$1 [L]

...but when I try to use it in .htaccess like this:

RewriteEngine On
RewriteCond Host: (.*)
RewriteRule /vehicles((/car_shipping|/auto_shipper|/auto_transport).+)/
/vehicles/includes/etc/master.php?href=$1 [L]

...I get a 404. I know APE is working because I tested it.

Can someone help me figure this out? I really appreciate it.

--Clay
Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 28 February 2011 at 8:48am

Hello.
mod_rewrite has a little bit different syntax. Please read the documentation: http://www.helicontech.com/ape/doc/mod_rewrite.htm

You can try the following code:
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^vehicles((?:car_shipping|auto_shipper|auto_transport).+)$
/vehicles/includes/etc/master.php?href=$1 [NC,L]


__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top Visit Vyacheslav's Homepage
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version