CooKieKing 发表于 2011-4-27 17:05:47

问个.htaccess的规则,多谢多谢

请看这个,这是一个WordPress的htaccess
# BEGIN WordPress
RewriteEngine on
RewriteBase /
RewriteCond $1 ^(index\.php)?$
RewriteCond $1 \.(gif|jpg|css|js|ico)$
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ -
RewriteRule . /index.php
# END WordPress

我现在想要添加一个RewriteRule,让用户访问http://域名/goto/www.163.com 重写成 http://域名/goto/index.php?url=www.163.com
请问下面的规则是正确的吗?
RewriteRule ^/goto/(.*)$ /goto/index.php?url=$1

还有这个规则应该放在什么地方,多谢了!!!
页: [1]
查看完整版本: 问个.htaccess的规则,多谢多谢