Redirect question using mod_rewrite (no extensions - root of site)
- by alex
Hi,
I'm having a small problem with mod_rewrite
I have the following in my .htacces:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.+)\.htm$ index.php?name=$1 [NC]
This is my index.php file:
<?php echo $_GET['name]; ?>
This works great for the following url:
www.mySite.com/this is an example.htm
this would display "this is an example"
What i'm trying to do however, is get it to do the same, without the .htm extension:
for example:
www.mySite.com/this is an example
Any ideas?
(dont think it's relevant but i'm using xampp to test this)