views:

30

answers:

2

I use this rule so all URLs have a trailing slash

rewriteRule ^(([a-z0-9\-]+/)*[a-z0-9\-]+)$ $1/ [NC,R=301,L]

it will convert /about to /about/

The problem is, however, if I submit a form (POST) to /about, when it rewrites to /about/, it loses all the POST info ($_POST in PHP is blank)

is there a way to rewrite it for everything except POST'd queries?

+2  A: 

Put this in the line before:

RewriteCond %{REQUEST_METHOD} !POST
Ignacio Vazquez-Abrams
A: 
RewriteCond %{THE_REQUEST} ^GET

before your RewriteRule. (works on Apache 1.3 too)

Pindatjuh