有什么可以帮助我吗?我的文件.htaccess
有问题www.test.com/box.php?name=abc-defg&code=xyz
到
www.test.com/abc-defg/xyz
我试过这样的结果:
www.test.com/abc-defg-xyz
使用这样的代码
Options -MultiViews
RewriteEngine On
# STRONG HTACCESS PROTECTION
<Files ~ "^.*\.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</Files>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ $1.php [L,QSA]
# Index Normal
#RewriteRule ^(.*)$ $1.php [L]
RewriteRule ^([a-zA-Z_-]+)-([a-zA-Z_-]+)?$ box.php?name=$1&code=$2 [L]
我试图像这样更改代码
RewriteRule ^ ([a-zA-Z_-] +)-([a-zA-Z_-] +)? $ Box.php?name=$1&code=$2 [L]
to
RewriteRule ^ ([a-zA-Z_-] +)/([a-zA-Z_-] +)? $ Box.php?name=$1&code=$2 [L]
并且成功了,但是因为网站看起来很乱(比如不能包含css文件)
谁能看到我做错了什么?