This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions (Forum Locked Forum Locked)
 Helicon Tech : Common Questions
Subject Topic: URL rewriting problem (Topic Closed Topic Closed)
Author
Message |
itshakeel23
Newbie


Joined: 15 April 2009
Location: Pakistan
Posts: 5
Posted: 18 June 2009 at 4:14am  

can anybody resolve my problem ??????

i have following URLs

1) www.abc.com/admin/default.asp
2) www.abc.com/admin/browsebymd.asp?m=1
3) www.abc.com/admin/browsebyv.asp?v=1

i want to exchange these url to following:

1) www.abc.com/admin/
2) www.abc.com/admin/BMW
3) www.abc.com/admin/BMW/3-Series

can anybody tell me rules for it???
actually the problem is, my directory name is "admin" and url starts with "admin" url.

kindly tell me.
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 18 June 2009 at 7:40am  

I advise you to use the following map files:

mapfile1.txt:
BMW 1
etc.

mapfile2.txt:
3-Series 1
etc.

And the config like this:

RewriteEngine on
RewriteBase /
RewriteMap mapfile1 txt:mapfile1.txt [NC]
RewriteMap mapfile2 txt:mapfile2.txt [NC]
RewriteRule ^admin/?$ admin/default.asp [NC,L]
RewriteRule ^admin/([^/]+)$ admin/browsebymd.asp?m=${mapfile1:$1} [NC,L]
RewriteRule ^admin/[^/]+/([^/]+)$ admin/browsebyv.asp?v=${mapfile1:$1} [NC,L]

__________________
Regards,
Anton
Back to Top
 

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

Printable version Printable version
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