我目前正在管理面板上,我需要有不同的页面,并且所有页面都有一个rewriteURL,因此它具有漂亮的URL。
当我在本地服务器上运行(Kubuntu 19.04)时,一切正常,我的URL正常运行,没有404错误,但是当我上传文件并尝试访问网站时,我的一些URL无法正常工作,我得到了404 error
...
我发现解决问题的唯一方法是重命名文件,或者重写URL (例如添加字母)。
我的.htaccess
:
Options -Indexes
RewriteEngine on
## Admin
RewriteRule ^restricted$ ./restricted.php [L]
RewriteRule ^online-players$ ./onlineUsers.php [L]
RewriteRule ^users/([A-Za-z0-9]+)/?$ ./user.php?license=$1 [L,QSA] # Wasn't working until I add a 's' to 'users'.
RewriteRule ^all-players$ ./all-users.php [L]
RewriteRule ^server-state$ ./serverState.php [L] # Wasn't working until I remove the '-' from the file.
RewriteRule ^staff$ ./staff.php [L] # Is not working
RewriteRule ^search$ ./search.php [L] # Is not working
## Errors
ErrorDocument 404 /admin/errors.php?e=404
ErrorDocument 403 /admin/errors.php?e=403
ErrorDocument 500 /admin/errors.php?e=500
ErrorDocument 503 /admin/errors.php?e=503
我的apache.conf
:
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
RewriteEngine on
</Directory>
我的问题是:是否有“禁止”字眼?这种行为正常吗?我做错什么了吗?
谢谢