[英].htaccess with redirection won't work
我在linuxmint 15中啟用了mod_rewrite。但是.htaccess無法正常工作。 這是我的Apache配置
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/xampp/htdocs
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/xampp/htdocs/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
請幫我。 問我是否需要任何信息。
這也是我的htaccess文件
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /mehedi.php [L]
</IfModule>
htaccess文件位於“ / var / www / xampp / htdocs /”目錄中。
謝謝
您的Apache錯誤日志中有什么有用的內容嗎? 我建議檢查您的httpd.conf中是否設置了任何選項指令。 對於您配置的該DocumentRoot之上的一個或多個目錄,您的AllowOverride選項可能設置為None或“ All”以外的其他選項。 希望這有幫助,祝你好運!
您是否激活了重寫模塊? ( sudo a2enmod rewrite
+ sudo service apache2 restart
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.