English 中文(简体)
URL在进入皇家警察部队时的双重鞭??
原标题:Double Slash at end of URL when going to HTTPS?

我的网站目前利用网站收集的数据(格式数据使用https)和https部分。

我的指数网页上有PHP代码:

<?php
    session_start();
    ob_start();
    if( $_SERVER[ SERVER_PORT ] == 443) {
        header( Location:http:// .$_SERVER[ HTTP_HOST ].dirname($_SERVER[ PHP_SELF ])); 
        die();
    } 
?>

然而,该网页不会装载,我有404个错误。 同样,在使用头部法用https security访问各章节时:

<?php
session_start();
ob_start();
    if( $_SERVER[ SERVER_PORT ] == 80) {
        header( Location:https:// .$_SERVER[ HTTP_HOST ].dirname($_SERVER[ PHP_SELF ]). / .basename($_SERVER[ PHP_SELF ])); 
        die();
    }
?>

该网站没有回应,并出于某种原因,在从https转换到https时造成双重冲突。

例:http://www.abc.com/,然后点击路要到报名的纽顿。 网址:。 http://www.abc.com/enroll.php

为什么需要双重鞭 the,谁能帮助处理404起错误?

最佳回答

PHP_SELF,因为这不一定是完整的目录。

dirname("/enroll.php”>>将正确退回空洞,进而形成双层<代码>/。

你试图做什么?

问题回答

暂无回答




相关问题
why the session in iis automatically log out?

I used iis6, and when i called a function Directory.delete(), the all the session relate this website will be logged out. and i debugged the website, i found no exception. any one have ideas on this ? ...

Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to ...

Can I get the size of a Session object in bytes in c#?

Is it possible to get the size(in bytes) of a Session object after storing something such as a datatable inside it? I want to get the size of a particular Session object, such as Session["table1"], ...

提供严格分类的出席会议物体

提供严格分类的与会机会的最佳方式是什么? 我正计划转而选择矩阵,这正在促使汇编者抱怨我的幻觉方案拟订方法......

PHP Session is not destroying after user logout

I m trying to create an authentication mechanism for my PHP Application and I m having difficulty destroying the session. I ve tried unsetting the authentication token which was previously set within ...

热门标签