Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/299.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php My.htaccess在我的ubuntu服务器上不工作_Php_.htaccess - Fatal编程技术网

Php My.htaccess在我的ubuntu服务器上不工作

Php My.htaccess在我的ubuntu服务器上不工作,php,.htaccess,Php,.htaccess,我正在ubuntu服务器下开发我的web应用程序。我想覆盖或隐藏我的index.php。我正在尝试访问html获取方法Pls。帮忙,我怎么也认不出我的错误。谢谢 找不到 在此服务器上找不到请求的URL/api/auth Apache/2.4.18(Ubuntu)服务器192.168.2.60端口80我已经搜索了多个可能的答案。这篇文章帮助我使用.htaccess。我只需要在/var/www/启用覆盖。这是链接,它可能会帮助你们 旁注:“从这个”和“到这个”是另一个方向。它从api/auth

我正在ubuntu服务器下开发我的web应用程序。我想覆盖或隐藏我的index.php。我正在尝试访问html获取方法Pls。帮忙,我怎么也认不出我的错误。谢谢

找不到 在此服务器上找不到请求的URL/api/auth


Apache/2.4.18(Ubuntu)服务器192.168.2.60端口80

我已经搜索了多个可能的答案。这篇文章帮助我使用.htaccess。我只需要在/var/www/启用覆盖。这是链接,它可能会帮助你们


旁注:“从这个”和“到这个”是另一个方向。它从
api/auth
重写到
index.php?url=$1
.htaccess
位于哪个文件夹中?根?或者在
/api
?/api/.htaccess中
RewriteEngine On
RewriteRule ^([^/]+)/? index.php?url=$1 [L,QSA]
From this - http://192.168.2.60/api/index.php?url=auth
To this - http://192.168.2.60/api/auth