I'm using URL Rewriting for a simple note application in my website. All things are UNDER /notes/ directory. .htaccess contents are,
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?filename=$1 [L]
and the url which is to be accessed is,
http://localhost/notes/test.txt
I want to get test.txt as the filename variable's value.
But when I use echo $_GET['filename']; in index.php, it displays index.php instead of displaying test.txt.
here, test.txt is not a real text file but the filename variable's value.