我想重写另一个目录中的文件,但它给出了一个错误。从另一个目录重写文件
未找到
所请求的网址/管理/职位/编辑/ 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 ...是的..它存在 –