This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Better way of rewriting subfolder support
Author
Message |
zazar
Newbie


Joined: 12 January 2012
Posts: 1
Posted: 12 January 2012 at 2:08am

Hi

I need to support 1 to 4 subfolders that can contain any letters and numbers located off a particular directory ie

/folder/xxx
/folder/xxx/yyy
/folder/xxx/yyy/zzz

The 'folder' will always be present.

I have this working with the following:

RewriteRule ^(.+|)/folder/([^.]+)/([^.]+)/([^.]+)/([^.]+) $1/folder/default.asp?p1=$2&p2=$3&p3=$4&p4=$5 [NC,L]
RewriteRule ^(.+|)/folder/([^.]+)/([^.]+)/([^.]+) $1/folder/default.asp?p1=$2&p2=$3&p3=$4 [NC,L]
RewriteRule ^(.+|)/folder/([^.]+)/([^.]+) $1/folder/default.asp?p1=$2&p2=$3 [NC,L]
RewriteRule ^(.+|)/folder/([^.]+) $1/folder/default.asp?p1=$2 [NC]

I was wondering if there is a better more efficient way of doing this?

Thanks
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 12 January 2012 at 6:40am

Hello,

These are perfectly okay. In case you want to minimize the rules, please, don't. Minimizing makes thing worse 80% cases.


Regards
Andrew
Back to Top
 

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

Printable version Printable version