VPS侦探论坛

 找回密码
 注册
查看: 5912|回复: 0

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

[复制链接]
发表于 2011-4-27 17:05:47 | 显示全部楼层 |阅读模式

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

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

还有这个规则应该放在什么地方,多谢了!!!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-20 08:54 , Processed in 0.025095 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表