我的问题是我将整个网站移动到了public-html的子文件夹中。试图重写URLS以通过.htaccess自动添加子文件夹,但没有成功 这是代码:
ErrorDocument 401 "Unauthorized"
ErrorDocument 403 "Forbidden"
RewriteEngine On
RewriteBase /
DirectoryIndex index.php index.cgi index.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ anb/$1 [L,QSA]
提前致谢
答案 0 :(得分:0)
我通过删除行
来实现它RewriteBase /
当.htaccess放在根目录A.K.A [public_html]
时,RewriteBase显然不能正常工作