mod_rewrite的啓用的.htaccess在CentOS的網絡面板不工作
vhosts.conf設置爲允許
<Directory "/home/chinatow/public_html">
AllowOverride All
</Directory>
的.htaccess(應該沒問題)
#--- Uncomment this line for production or testing server
#SetEnv CI_ENV production
#--- Allow remote API access; change "*" to "your-domain.com" for better security
#--- Note: require Headers mod enabled (sudo a2enmod headers)
#Header add Access-Control-Allow-Origin "*"
#--- URL rewrite
#--- Note: require Headers mod enabled (sudo a2enmod rewrite)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
我想一切正常,但最終.htaccess無法正常工作。
感謝您的回答。但沒有工作。嘗試了 –