PDA

View Full Version : formatting apache rewrite rule



komrad
04 Nov 2008, 12:06 AM
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, 04:24 PM
I think the following should work ...



RewriteEngine on
RewriteBase /

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

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