0
因此,如果我有一个名为CONTENT的directrory和像localhost/内容 /东西的URL。 MR将URL重写为www.localhost/CONTENT /东西。 我不在规则中使用nc标志,!-f和!-d cond。并没有影响到这一点(如果他们在评论中也是如此)。 我的.htaccess看起来是这样的:Mod重写在localhost上重写url从小写到大写
Options +FollowSymlinks
RewriteEngine on
#ignore all real files (php skripts, imgs, styles)
RewriteCond %{REQUEST_FILENAME} !-f
#ignore all real directories
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/myCMS/$1 [R=301,L] # localhost
######RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # real hosting
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]
#####RewriteRule ^(.*)$ indexTest.php?url=$1 [L,QSA]
是否有在httpd.conf一些SETING的情况下SENS默认?谢谢你的帮助。