简体   繁体   English

干净的URL htaccess

[英]Clean URL htaccess

I want to make my website links to be changed from that 我想更改我的网站链接

http://www.example.com/index.php?a=page&b=about

to that 那个

http://www.egysocial.tk/about

and i want to redirect my old URL to the new one. 我想将旧网址重定向到新网址。 Thanks 谢谢

Try: 尝试:

RewriteEngine On

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?a=page&b=([^&\ ]+)
RewriteRule ^ /%1? [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?a=page&b=$1 [L]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM