Jump to content

[SOLVED] redirect to a page at root directory


abdfahim

Recommended Posts

I want to redirect the visitor to a certain page located at root directory using header function. I have two difficulties though

 

1) My server has a dynamic IP, as a result of that I cant use a direct path in my header location like

http://123.123.123.123/mypge.php

 

2) I cant use a relative path in header location like

../mypage.php

because the files where I put the header funtion located at different directories and subdirectories.

 

I tried to use the following function in the server hosted at my PC

/$_SERVER["HTTP_HOST"]/mypage.php

but it returns http://localhost/localhost/mypage.php (watch two localhost)

 

can anyone help?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.