.HTACCESS Unicode Recignisition/Encoding

被刻印的时光 ゝ 提交于 2019-12-01 08:59:23

You can change your existing rule with rule:

RewriteEngine On

RewriteBase /

# executes repeatedly as long as there are more than 1 spaces in URI
RewriteRule "^(\S*)\s+(\S* .*)$" $1+$2 [N,NE]

# executes when there is exactly 1 space in URI
RewriteRule "^(\S*)\s(\S*)$" $1+$2 [L,R=302,NE]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

RewriteRule ^([A-Z](?:[^\x00-\x7F]+|[A-Z])?).*$ ?open=encyclopedia&letter=$1&term=$0 [B,L,QSA]

RewriteRule ^([^\x00-\x7F]+).*$ ?open=encyclopedia&letter=$1&term=$0 [B,L,QSA]

Negated character class [^\x00-\x7F] matches any character outside ASCII range.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!