1
<IfModule mod_rewrite.c>
Options +FollowSymlinks
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.am [NC]
RewriteRule ^(.*)$ http://example.am/$1 [L,R=301]
</IfModule>
为什么不工作,我补充说,在中端/etc/httpd/conf/http.conf,我确信国防部重写不工作的CentOS
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory "/var/www/html">
是因为我的网站在/ srv/www/domain/public_html?
是您的网站www.example.am,并且在其虚拟主机定义中定义为这样? –
不,我把我的网址,但我有我的网址以前它仍然没有工作? – user3211562
也许mod_rewrite没有加载?不要这样使用IfModule! – covener