Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions
 Helicon Tech : Common Questions
Subject Topic: use querystring as a subdirectory Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
dentkt
Newbie
Newbie


Joined: 26 February 2008
Location: Malaysia
Online Status: Offline
Posts: 2
Posted: 26 February 2008 at 11:22am | IP Logged Quote dentkt

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 View dentkt's Profile Search for other posts by dentkt
 
dentkt
Newbie
Newbie


Joined: 26 February 2008
Location: Malaysia
Online Status: Offline
Posts: 2
Posted: 26 February 2008 at 10:10pm | IP Logged Quote dentkt

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 View dentkt's Profile Search for other posts by dentkt
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6466
Posted: 28 February 2008 at 6:31am | IP Logged Quote Yaroslav

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 View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 

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