简体   繁体   English

Slim Framework .htaccess HTTPS

[英]Slim Framework .htaccess HTTPS

I am using Slim for an API which is working really well under http but when I request the URL in https I get a 404 error. 我将Slim用于API,该API在http下可以很好地工作,但是当我在https中请求URL时,出现404错误。

I think it has something to do with my .htaccess file, but I am not sure. 我认为这与我的.htaccess文件有关,但我不确定。 Can anyone point out what am I doing wrong here. 谁能指出我在这里做错了什么。

.htaccess : .htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]

Depending on your server configuration the server might serve another directory when accessed via httpd ( eg httpsdocs instead of httpdocs). 根据您的服务器配置,当通过httpd访问服务器时,该服务器可能会提供另一个目录(例如,httpsdocs而不是httpdocs)。

You'll either have to change the configuration, copy the content or try to create a symlink from the http directory to the https directory. 您要么必须更改配置,复制内容,要么尝试创建从http目录到https目录的符号链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM