回 1楼(云代维) 的帖子
如果已经支持了rewrite,直接在你要做的站点配置文件里面添加以下代码,注意修改域名为你要做的域名。
-----------------------------
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^php100.com
RewriteRule ^(.*)$ http://www.php100.com/$1 [R=permanent,L]
----------------------------------------------------------------
这个配置应该写在哪里?http.conf?还是.htaccess里?不过我写在哪里都不好用
-------------------------
回 3楼(火蓝云) 的帖子
<ifmodule mod_rewrite.c>
RewriteEngine on
RewriteLog "D:/apache22/logs/rewrite.log"
RewriteCond %{HTTP_HOST}!^www.baidu.com [NC]
RewriteRule ^/(.*) http://www.baidu.com:8083/ [R=301,L]
</ifmodule>
我在htaccess文件中这么写的(windows系统),访问页面时,提示
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator,
webmaster@dummy-host.jrmart.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
这是哪里不对?