0
如何配置.htaccess文件,除了重定向一切,除了P = *
domain.com?p=*
和
domain.com/index.php?p=*
每一個環節重定向到domain.com的
我希望你明白我的問題,謝謝你的每一個答案。 來自德國的問候。你的文檔根
如何配置.htaccess文件,除了重定向一切,除了P = *
domain.com?p=*
和
domain.com/index.php?p=*
每一個環節重定向到domain.com的
我希望你明白我的問題,謝謝你的每一個答案。 來自德國的問候。你的文檔根
把這個在htaccess文件:
RewriteEngine On
# if query string is p=(something)
RewriteCond %{QUERY_STRING} ^p=
# and request is for "/" or "/index.php"
RewriteCond %{REQUEST_URI} ^/$ [OR]
RewriteCond %{REQUEST_URI} ^/index\.php$
# pass it through, don't do anything
RewriteRule^- [L]
# otherwise, redirect everything else to http://domain.com/
RewriteRule^http://domain.com/ [L,R=301]