.htaccess file for [url]www.example.com:[/url]
Options +FollowSymLinks RewriteEngine On RewriteRule (.*)$ index.php?id=$1
example.com index.php: <?php echo $_GET['id']; ?>
Now when I enter this url: www.example.com/21 index.php echos index.php
Why??
try / instead of ^
no luck 🙁
I get a not found page when I do that.
Although it works if I do this:
Options +FollowSymLinks RewriteEngine On RewriteRule (.*).html$ index.php?id=$1
www.example.com/21.html
problem was caused by using regex: (.*)