I’m trying to return a success notice if the $_GET[‘success’] is set. It works fine if I input it like this: mail?inbox&success
But I’m trying to make it work if I input it like this: mail/inbox/success or mail/inbox&success
I’m not very experienced with mod_rewrite and I havent found a solution yet so I’m asking here. How would I get it to work with the examples above? This is what the .htaccess looks like right now:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteRule ^user/([^/]*)$ /userinfo?name=$1 [L]
RewriteRule ^items/([^/]*)$ /items?weapon=$1 [L]
RewriteRule ^mail/inbox /mail?inbox [L]
RewriteRule mail/(.*)/(.*)$ /mail?read=$2
You could change
to
Depends on what other combinations you want to rewrite.
Adding the line
before the first rule should do it also, but only for this one case and may influence other rules.