任何人都可以幫助我處理我的 htaccess 檔案,它僅適用于根域目錄檔案夾,如果我將索引檔案放入根域目錄并像https://example.com/edr/login這樣訪問頁面,它作業得很好。但是,當我在其中創建檔案夾并嘗試訪問這樣的站點https://example.com/createdfolder/edr/login時,它會顯示“不存在輸入檔案。以下是我的 htaac??cess 檔案代碼。我的 $_SERVER['QUERY_STRING'] 設定為“登錄”
Options All -Indexes
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f [NC]
RewriteRule ^(.*)$ $1.php [L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]
uj5u.com熱心網友回復:
如果要復制 WordPress 的 .htaccess,它將如下所示:
RewriteEngine On
RewriteBase /createfolder/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /createfolder/index.php [L]
當然你可以替換createfolder/為your/path/
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/510604.html
