ERROR 403 - FORBIDDEN

Example URL:

"example.com/MemberLogin?redirect=http://www.example.com/My-Account/Details" -> 403 Error

"example.com/MemberLogin?redirect=My-Account/Details" -> No Error

"example.com/MemberLogin?" -> No Error

What is the reason for this?

MemberLogin.php

 <?php
   define("_VALID_PHP", true);
   require_once("/.../init.php");

   if ($user->logged_in)
       redirect_to("http://www.example.com/Yonlendirme.php?redirect=" . $_GET['redirect'] .      "");


   if (isset($_POST['doLogin']))
       : $result = $user->login($_POST['username'], $_POST['password']);

   /* Login Successful */
   if ($result)
       : redirect_to("http://www.example.com/Yonlendirme.php?redirect=" . $_GET['redirect']      . "" );
   endif;
   endif;
 ?>

Yonlendirme.php

 <?php if ($_GET['redirect'])
 {
     header('Location: ' . $_GET['redirect'] . '');
 }
 else
 {
    header('Location: http://www.example.com/My-Account');
 }
 ?>

Answers


Can you try this, and still say it dont work? If so please show whats in the redirect_to function..

<?php
   define("_VALID_PHP", true);
   require_once("/.../init.php");

   if ($user->logged_in)
       redirect_to("http://www.example.com/Yonlendirme.php?redirect=".urlencode($_GET['redirect']));


   if (isset($_POST['doLogin']))
       : $result = $user->login($_POST['username'], $_POST['password']);

   /* Login Successful */
   if ($result)
       : redirect_to("http://www.example.com/Yonlendirme.php?redirect=".urlencode($_GET['redirect']));
   endif;
   endif;
?>

...

<?php 
if (isset($_GET['redirect']))
{
    exit(header('Location: ' . urldecode($_GET['redirect'])));
}
else
{
    exit(header('Location: http://www.example.com/My-Account'));
}
?>

Need Your Help

CoordinatorLayout, AppBarLayout and ToolBar - Toolbar doesn't scroll off the screen

android android-layout android-studio android-toolbar android-coordinatorlayout

I am trying to make my ToolBar scroll off the screen, when I scroll up my ViewPager(ViewPager is inside a fragment that is placed in FrameLayout) and show the ToolBar when I scroll down. I am tryin...

How to postback from jQuery Dialog to the parent page?

c# javascript jquery asp.net

I have a pageA.aspx. In it I open a jQuery dialog with an iframe containing the pageB.asxp.