.htaccess RewriteRule Problem

Posted by Kunal Gautam on Server Fault See other posts from Server Fault or by Kunal Gautam
Published on 2010-02-06T18:42:07Z Indexed on 2010/04/11 9:03 UTC
Read the original article Hit count: 386

Before asking question let me tell you some assumptions here there are 5 files on my webserver index.php config.php read.php write.php .htaccess

I've wrote following URL rewriting rule in .htaccess

RewriteEngine on RewriteRule ^(\w+)$ read.php?id=$1

Now when I type domain.com/xyz it fetch data from read.php?id=xyz thats nice :)

But when I type domain.com/index it fetch data from index.php or when i type domain.com/write or domain.com/config or domain.com/read it fetch data from write.php , config.php and read.php respectively

I want data to be fectched from read.php?id=index or read.php?id=config or read.php?id=read or read.php?id=write

Any one can help me regarding this ?

Sorry for my poor english

© Server Fault or respective owner

Related posts about .htaccess

Related posts about apache