我想重寫另一個目錄中的文件,但它給出了一個錯誤。從另一個目錄重寫文件
未找到
所請求的網址/管理/職位/編輯/ 1在此服務器上找到。
此外,在嘗試 使用ErrorDocument來處理請求時遇到404未找到錯誤。
/public_html
/admin
/.htaccess
/posts
我需要從這個www.example.com/admin/posts/edit.php?id=1
我有這樣的代碼在我的.htaccess做到這一點www.example.com/admin/posts/edit/1
:
RewriteEngine On
RewriteRule ^edit/([0-9a-zA-Z]+) /admin/posts/edit.php?id=$1 [NC,L]
/admin/posts/edit.ph p?id = $ 1 ...是的..它存在 –