I try to RewriteRule my GET variables. I searched many sites but none of the .htacces rewrites seem to work.
I like to rewrite the following URL:
http://www.uniquetravelling.nl/reis-info?reis=ijsland
to:
http://www.uniquetravelling.nl/reis-info/reis/ijsland
I use the following RewriteRules to filter at least my .php of every file:
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
Header add "disablevcache" "true"
ErrorDocument 404 /404.php
IndexIgnore *
This is how I call the URL link
<a class="mobile-link-reisaanbod" href="http://www.uniquetravelling.nl/reis-info?reis=ijsland">meer info...</a>
This is how I retrieve the GET variable from the URL
if(!isset($_GET['reis']) || empty($_GET['reis'])){
header('Location: 404');
} else {
$reis = strtolower($_GET['reis']);
}
Can someone help me with the rewrite code specific for my website?
Thanks a lot!