I have to rewrite www.url.com/opslag/view.php?visopslag=(id)
with htaccess to something more beautiful :o) Im creating a forum likely application. This is what i want to be rewrote:
My request is:
www.url.com/opslag/vis/id
How can I do this? I've tried lots of different things like:
RewriteRule ^/opslag/([^/.]+)/?$ view.php?vis=$1 [L]
My complete .htaccess:
RewriteEngine On
"#Rewrite view.php?vis=id
RewriteRule ^opslag/vis/([0-9]+)$ /opslag/view.php?vis=$1 [L,R,QSA]
"#Remove index.php
"#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /.*index.php HTTP/
"#RewriteRule ^(.*)index.php$ /$1 [R=301,L]
"#Remove /page/
"#RewriteCond %{REQUEST_FILENAME} !-f
"#RewriteCond %{REQUEST_FILENAME} !-d
"#RewriteRule ^([^/.]+)/?$ index.php?page=$1 [L]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…