Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP : session variable aren't usable when site is redirected

I've to admin a small website for my alumni group which is hosted by my ISV. The url is something like www.myIsv.com/myWebSite/ which is quite ugly and very forgetable. The main admin of the webserver has registered a domain name www.mysmallwebsite.com and put a index.html with this content:

<html>
<head>
<title>www.mysmallwebsite.com</title>
</head>

<frameset>
   <frame src="http://www.myIsv.com/myWebSite/" name="redir">
      <noframes>
        <p>Original location:
          <a href="www.myIsv.com/myWebSite/">http://www.myIsv.com/myWebSite/</a>
        </p>
      </noframes>
 </frameset>  
</html>

It works fine, but some features like PHP Session variables doesn't work anymore! Anyone has a suggestion for correcting that?

Edit: This doesn't work both on IE and on Firefox (no plugins)

Thanks

like image 257
Steve Gury Avatar asked Sep 01 '08 20:09

Steve Gury


1 Answers

Sessions are tied to the server AND the domain. Using frameset across domain will cause all kind of breakage because that's just not how it was designed to do.

Try using apache mod rewrite to create a "passthrough redirection", the "proxy" flag ([P]) in the rule is the magic flag that you need

Documentation at http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

like image 191
paan Avatar answered Nov 03 '22 04:11

paan