所以所有的数据,这里的情况是:重定向通过HTTPS服务到http
我们正在运行的是由Drupal供电的网站。前段时间,决定将该网站用作SSL。将网站从http重定向到https的设置是由一个不在我们身边的人完成的。
我可以在.htaccess
文件中看到以下行
#Redirect http to https
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://docs.dev.domain.com/$1 [R,L]
mydomain.com指向LAMPP服务器的根和我的网站是Web根目录中的文件夹(docs.dev.domain.com在/我的网站)。
现在,已经决定不需要SSL,它必须被删除,并且所有页面必须通过http(301重定向)提供。
当我这样做,在使用RewriteRule
重定向URL .htaccess文件(例如https://docs.dev.domain.com/mysite/content/book),以当用户访问HTTPS通过使用HTTP:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule^index.php [L]
#Redirect HTTPS to HTTP
RewriteCond %{SERVER_PORT} ^443$
#RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ http://docs.dev.domain.com/mysite/$1 [R=301,L]
#even tried this - RewriteRule ^(.*)$ http://docs.dev.domain.com/$1 [R=301,L]
,但在HTTPS每个请求重定向http://mydomain.com/mysite/index.php(即使是像https://docs.dev.domain.com/mysite/content/book/1这样的网址也应该被重定向到http
)。
如何删除https以便我的动态网址通过纯http服务? 对不起,如果这是非常新手p roblem。
它的工作!谢谢。 –