Apache / mod_rewrite / Periods with pattern


First question, here goes nothing...

I'm trying to add a new entry to my .htaccess file (Apache server) with the hopes of translating this URL:


into this URL:


The RewriteRule that I'm currently using is this:

RewriteRule ^([^/\.]+)\/?$ index.php?page=$1

This rule has worked fine for all URLs up until now, I can only assume that it is the period that is breaking it.

What I'm trying to achieve is having anything in the URL after the "http://platform.localhost/" passed into the "page" variable of index.php.

I know I've missed something stupid, can someone please be kind enough to point it out?


the pattern says to reject dots, but you could do tis:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page=$1 [QSA,L]