PDA

View Full Version : formatting apache rewrite rule



komrad
03 Nov 2008, 11:06 PM
Hello all,

I have dynamic pages that look like this.

/index.php?purl=text_variable_with_underscore_2355.html

What would be the rewrite rule to get them to look like this.

/text_variable_with_underscore_2355.html

There is no other page besides index.php for this site.

Thanks

dbrandon
04 Nov 2008, 03:24 PM
I think the following should work ...



RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?purl=$1