Reputation: 1643
We want this type of URL: www.ourdomain.com/dev/kunde-first/service
to be rewritten to: www.ourdomain.com/dev/kunde-first/inhalt.php?id=service
and are using this in our .htaccess:
RewriteEngine On
RewriteBase /dev/kunde-first/
RewriteCond %{REQUEST_FILENAME} !.(jpg|jpeg|gif|png|css|js|ico|txt|html|htm|xml|eot|woff|ttf|svg)$
RewriteCond %{REQUEST_FILENAME} !.(scripts/[^/]*)$
RewriteRule ^([A-Za-z0-9-]+) inhalt.php?id=$1 [NC,L] # process navigation
However, when we fetch $_GET['id'] we get 'inhalt' instead of 'service'.
Any help would be greatly appreciated!
Upvotes: 1
Views: 44
Reputation: 784918
Try this rule with correct regex:
RewriteEngine On
RewriteBase /dev/kunde-first/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(\w+)/?$ inhalt.php?id=$1 [NC,L,QSA]
Upvotes: 1