我有PHP的作品真棒 但我想它显示变量看起来像迪尔斯htaccess的用不同的名称/变量连击PHP的
如改变:
example.com/?mode=page&page=15
到example.com/page/15
和
example.com/?mode=pic&picid=136
至example.com/pic/136
howe版本我只知道这样做的一种方式,如:
RewriteRule ^(.*)$ index.php?mode=$1&page [R]
但只适用于一种情况,否则404
我尝试使用RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]
使整个路径被传递。但是,这种方式似乎并没有在我的页面中传递CSS。
我非常困惑......
这是我的htaccess文件
# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteBase/
IndexIgnore *
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_URI} !^css/styles\.css$
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]
如果仍令人担忧:是您的基本URI域或本地主机后直接?如果不是,你必须在html中的路径中引用它。 – fourreux