1
我想使基于codeigniter的网站能够将index.php?option = test & controller = con1转换为/ test/con1使用.htaccess我试着找到多个示例似乎没有工作,它直接进入主页。有任何想法吗?apache htaccess codeigniter查询字符串路径
我已经尝试过类似的事情
RewriteCond %{QUERY_STRING} ^(\w+)=(\w+)$
RewriteRule ^\/(.+?)\/(.+?)\/? /index.php/$1/$2 [L]
,但不会引发任何错误或任何东西。 我目前htacces是
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|img|js|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
移动的RewriteCond的一个不同点? – Shawn
只是试图用我上面提供的 –
替换你当前的htaccess。我确实没有看到任何区别,仍然忽略了GET参数。 – Shawn