0
您好我在mac上使用apache,我已啓用php。我正在嘗試使用.htacess重寫我的網址。.htaccess重寫網址 - 從〜用戶名 - osx apache
http://localhost/~username/project/test to http://localhost/~username/project/index.php?url=test
But received 404 error - on retrieving url - http://localhost/~username/project/test .
But - this - http://localhost/~username/project/index.php?url=test - Php is working fine.
我.htacess文件中包含這五行:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
我可以在PHP的信息加載的模塊看到的mod_rewrite。我如何調試這個來確定是否正在調用.htaccess。
我的.htaccess文件的路徑是 - 〜username/Sites/project/.htaccess。