Hey guys, I have a site for example http://www.sitename.com/mylayouts.php But have htaccess'ed it so it is http://www.sitename.com/mylayouts/page/1 Now, to authorize the user via a 3rd party API, they do not accept the htaccess version of the URL, it needs to be done via the original. Upon authorization, which I have the code for already, I need some sort of code that will see if it is viewing the mylayouts.php version of the URL and if so, redirect it too mylayouts/page/1 If that is possible. Thanks
I hope i understood what it is you are saying. but try something like this nothing fancy. place that into your mylayouts.php file after all needed code had finished loaded: if(basename(__FILE__)=='mylayouts.php') header('location:mylayouts/page/1'); PHP:
Just for reference you can also redirect after a period of time using php header("refresh:5;url=mylayouts/page/1"); PHP: This example being 5 seconds.. The only problem with header redirects is that they must be called before any other output... you can get around this with php buffering by calling a function at the beginning of your page and at the end ob_start(); // website code here ob_end_flush(); PHP: