Hello I've got a problem with rewriting my URLs via .htaccess
Php Info: Server API CGI/FastCGI Hoster settings: Apache mod_rewrite ON
Current url Layout:
http://www.xxxx.at/beitrag.php?thema=Bitcoins%20fuer%20jedermann%20gratis
Wanted:
http://www.xxxx.at/beitrag/Bitcoins%20fuer%20jedermann%20gratis (can I change %20 to "-" maybe too?)
I've stup a .htacces which looks like:
RewriteEngine On
RewriteRule (.*)_(.*)\.html$ /bitcoins.php?to=$1 [qsappend,L]
But the URL still looks the same, there is nothing changed.
Can someone help me please? regards
Try:
Options -Multiviews
RewriteEngine On
RewriteCond %{THE_REQUEST} \ /+beitrag\.php\?thema=([^&\ ]+)
RewriteRule ^ /beitrag/%1 [L,R]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^bietrag/(.+)$ /bietrag.php?thema=$1 [L]
/beitrag
doesn't preemptively get served with /beitrag.php
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.