473,385 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Session Variables and Domain Redirection Problem

Hi, I have an strange problem with session variables.

I have a site hosted in a local server. I have physic access to this
server and its configuration.(apache, php,files...).

I have external access to the web site by typing the public ip address
of the local server.

I have a domain too, and this domain is redirected to the static public
ip of the local server so when I type (out of the local server net) the
domain in a web explorer I surf to the content of the local server
(like typing the public ip).

I have observed with the redirection configuration, that when I click
on elements of the page that propagate parameters, this it is not
reflected in the address.
Example:
I have a link that points to http://www.mysite.com/link.php.
When I click on this link I go to the link but the explorer address is
always http://www.mysite.com.
However in the link properties I can see that this link points to
http://my local ip/link.php.
This doesn.t happen if I go to my site using the public Ip.

This is the problem:

I have the typical login form.When the data submitted is ok, the login
name is saved in a session variable.To check if the active visitor is
logged in, I check the existence of this session variable every page
refresh.

This works ok in the local server.
Using the public ip address works ok too.

But when I use the domain direction this does not work in Internet
explorer (I have tried in different computers). but in Mozilla it does
work. I think Internet explorer configuration is not letting session
variables to be propagated with the redirection.
Any sugestion?.
Thanks for reading.

Sep 21 '06 #1
2 2444
fReDiNi wrote:
Hi, I have an strange problem with session variables.

I have a site hosted in a local server. I have physic access to this
server and its configuration.(apache, php,files...).

I have external access to the web site by typing the public ip address
of the local server.

I have a domain too, and this domain is redirected to the static public
ip of the local server so when I type (out of the local server net) the
domain in a web explorer I surf to the content of the local server
(like typing the public ip).

I have observed with the redirection configuration, that when I click
on elements of the page that propagate parameters, this it is not
reflected in the address.
Example:
I have a link that points to http://www.mysite.com/link.php.
When I click on this link I go to the link but the explorer address is
always http://www.mysite.com.
However in the link properties I can see that this link points to
http://my local ip/link.php.
This doesn.t happen if I go to my site using the public Ip.

This is the problem:

I have the typical login form.When the data submitted is ok, the login
name is saved in a session variable.To check if the active visitor is
logged in, I check the existence of this session variable every page
refresh.

This works ok in the local server.
Using the public ip address works ok too.

But when I use the domain direction this does not work in Internet
explorer (I have tried in different computers). but in Mozilla it does
work. I think Internet explorer configuration is not letting session
variables to be propagated with the redirection.
Any sugestion?.
Thanks for reading.
Session id's are stored as cookies by default (depends on browser
settings). And one domain cannot read a cookie set by another domain.
To be able to do so would be a huge security hole.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 21 '06 #2
Session id's are stored as cookies by default (depends on browser
settings). And one domain cannot read a cookie set by another domain.
To be able to do so would be a huge security hole.
Yup..its depend on browser settings. If you use internet exporer and
the security and privacy settings is set to HIGH, your session can't be
stored. Try to set privacy settings to medium.

--
http://www.deshot.com
http://www.groupvita.com

Sep 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dave Smithz | last post by:
Hi there, I have implemented a login sequence using session variables for a PHP/MySQL DB which I took over development. I read some books and this NG and it seemed straight forward. However the...
8
by: Marc Hoeve | last post by:
Hi everybody I'm setting up 2 websites for a friend of mine, en I'm have problems with one of the sites. The situation: I have 2 different domains (both in the .NL domain). Both domains...
11
by: Vic Spainhower | last post by:
Hello, I just purchased a new domain name and I've set it up as a redirect to a folder on my main site. What is happening is the index.php page checks a session variable to see if the user is...
2
by: GFuller | last post by:
- We have 2 aspx pages in a .NET project. The first sets a session variable and has a button that when clicked performs a 'redirect' to the second page which then reads the session variable. ...
7
by: Seth | last post by:
I have noticed that the id of my session object changes when I switch from a non-secure to a secure connection. What I'm trying to do: I have a cookie that is built on the non-secure side of...
7
by: Victor | last post by:
I've got two domain names sharing the same IP address that use ASP VBScript If I set a session variable with domain 1, it is only available for domain 1 - this is correct? If I set an...
4
by: temp1213 | last post by:
I have two ASP .NET web forms A and B. A is a web form that geneates a binary graph and create some session variables before generate the graph. B is the display page which calls the A and display...
6
by: Victor | last post by:
I've got a website that displays the same whether it is accessed using www. or not. ex: http://www.mysite.com and http://mysite.com give me exactly the same website (both represent the top...
1
by: leo | last post by:
Hi , i have a problem with session variables. The web site was already working correctly using sessions, i've had to add a page which use a new variable session but this new one doesn't get...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.