mod rewrite help

They have: 4 posts

Joined: Jul 2004

hi,

i do a mod rewrite with the following.

RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^$ directory/file.php?id=%1

I wanted to make it to rewrite
domain.com/?123 -> domain.com/directory/file.php?id=123

it actually works but if i just type in
domain.com it will go to domain.com/directory/file.php

how can i make it that domain.com still pointing to domain.com

Please kindly advise.

thanks

They have: 4 posts

Joined: Jul 2004

Hi,

anyone can suggest a more useful forum than this which probably can help me to solve my problem?

They have: 4 posts

Joined: Jul 2004

Just solve my problem.

the correct RewriteCond will be

RewriteCond %{QUERY_STRING} ^(.+)$

thanks for looking...

He has: 1,758 posts

Joined: Jul 2002

Have you ever thought that perhaps nobody knew the answer? We can't offer advice on things we don't know and it's a waste of time/space just writing. "don't know" on everything we don't have an answer too.

Andy

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.