htaccess rewiterule

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
surath
Forum Newbie
Posts: 14
Joined: Fri Jun 15, 2007 8:59 am

htaccess rewiterule

Post by surath »

Hi all,

I have a situation to rewrite urls using the htaccess file. the situation is like that, I've to rewrite the url like "http://www.xyz.com/test/index.php?aId=test" to "http://www.xyz.com/test/".

Any idea how can I do that...

Thanx in advance
mwasif
Forum Newbie
Posts: 13
Joined: Sun Jul 15, 2007 1:24 pm

Post by mwasif »

RewriteRule ^test/$ test/index.php?aId=test [L]
surath
Forum Newbie
Posts: 14
Joined: Fri Jun 15, 2007 8:59 am

it's not working

Post by surath »

mwasif wrote:RewriteRule ^test/$ test/index.php?aId=test [L]
Thank you very much for the reply. But the bad thing is that it's not working

ohh...may be I'm doing it in a bit wrong way, I've placed it in the test sub-folder..is that right?

Another thing is that, actually situation is like this : "http://www.xyz.net/aId=<foldername>"
and I want it to appear like "http://www.xyz.net/<foldername>"..

thank you again
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Re: it's not working

Post by volka »

surath wrote:ohh...may be I'm doing it in a bit wrong way, I've placed it in the test sub-folder..is that right?
meaning you have this rule in a .htaccess file in <document_root>/test ?
surath
Forum Newbie
Posts: 14
Joined: Fri Jun 15, 2007 8:59 am

Re: it's not working

Post by surath »

volka wrote:
surath wrote:ohh...may be I'm doing it in a bit wrong way, I've placed it in the test sub-folder..is that right?
meaning you have this rule in a .htaccess file in <document_root>/test ?

Exactly so...I've placed it in <doc_root>/<sub_folder>/.htaccess

Is that the correct approach?

Or should it be the single .htaccess at <doc_root>?

If you can plz, give the rewriterule....I am trying heartnsoul...but all in vein..

thanking u in anticipation
Post Reply