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: use querystring as a subdirectory (Topic Closed Topic Closed)
Author
Message |
dentkt
Newbie


Joined: 26 February 2008
Location: Malaysia
Posts: 2
Posted: 26 February 2008 at 11:22am  

1) anything string typed in after the first slash of from .com
User type in:

domain.com/dennis
Result URL:
domain.com/member.asp?username=dennis

2) only from a fix directory (in case the first method affect my other sub directory)
User type in:
domain.com/member/dennis
Result URL:
domain.com/member.asp?username=dennis


hi there, i have tried all day long on getting the above result but no luck, gone thru most of the forum topics but still cannot find the solution. Pls find. Will appreciate your help and thank you very much in advance.

Back to Top
 
dentkt
Newbie


Joined: 26 February 2008
Location: Malaysia
Posts: 2
Posted: 26 February 2008 at 10:10pm  

By the way, if i rewrite the url to domain.com/dennis, will it effects when i try to access my other root files like domain.com/index.asp or real directory like domain.com/mydir?

and if it will affects, then can you pls help to write the rule for subdomain (which i think will avoid the issue above).

username.domain.com
to
domain.com/member.asp?username=dennis
with exception to
www, mail, cp, stat
and
i should be able to access my domain without the www as well

thank you so much in advance.
Back to Top
 
Yaroslav
Admin Group


Joined: 15 August 2002
Posts: 6520
Posted: 28 February 2008 at 6:31am  

The second variant is better in question of ambiguity. Here is a rule example:

RewriteEngine on
RewriteBase /
RewriteRule ^member/(.+)/?$ /member.asp?username=$1 [NC,L]

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top Visit Yaroslav's Homepage
 
Gaber76
Newbie


Joined: 28 January 2009
Posts: 1
Posted: 28 January 2009 at 12:04pm  

What if I have one URL with multiple variable possibilities?

Example:
domain.com/member.asp?username=dennis
domain.com/member.asp?password=miller

How do I determine which variable to use?

Thanks,
Gabe

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