我想将我的网址htaccess的短我的网址
从
accounts.php?cat=cr7-stability&subcat=cr7-atonic-gold-trading
到
accounts/cr7-stability/subcat=cr7-atonic-gold-trading
我创建htaccess文件的代码
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)$ accounts.php?cat=$1&subcat=$2 [L]
但是当我测试我得到没有c的旧网址变更
PS。我正在使用在线服务器测试子域 http://cr7.hostato.com/accounts.php?cat=cr7-stability&subcat=cr7-atonic-gold-trading
请尝试清除缓存。 – Akintunde007
我做过了,并且我在不同的浏览器上进行了检查 –
当您在浏览器中输入新的URL时会发生什么?你的规则是否重写了它? – starkeen