Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP Redirect and URL Mask

Status
Not open for further replies.

gazza110

Technical User
Apr 14, 2004
42
GB
Hi,

I need help with a redirect and mask of url using PHP.
I have created an online store to use within an educational context (the store is only a simulation - there is no live payment processing).

I have hosted this on my own webhosting server that I use for a different site. I have purchased a domain name to use as the store name and I want to be able to redirect to the url where the store is hosted.

The problem I have is that if I use a iframe or framed redirect this causes the store not to work as the session does not work.

Eg.

I have the store located at:


I have a domain name which is:


I want to be able to enter in the domain into the address bar which will take the user to the store but NOT change the URL in the address bar. As mentioned, I can do this with a framed redirect however this then stops the store from working as it should as it does not support frames.

Is there anyway to load the page normally (not in a frame) but show the URL as:


and not as:


Any ideas???

Thanks, Gary.
 
most webhosts allow you to configure multiple virtual hosts that use the same webroot.

for example 1&1 (which does things atypically), allows me to specify whatever file system directory I want as the server root for a given domain name. thus i can have five domain names all pointing to the same directory (which I do have for a wordpress multiple user installation).

but this is really not a php question. if you are looking for a php solution: the answer is a php proxy solution. but they are overly complex for a solution that is more easily solved that the web-server level.
 
Thanks for the info jpadie, this could be a way around it. My current hosting provider however offer a site redirect or a framed redirect to point to another site location.

Could you perhaps advise me further on a php proxy solution as you mentioned????

Many thanks, Gary.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top