.htaccess RewriteRule Problem
- by Kunal Gautam
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