Jump to content

Recommended Posts

Hi All

 

I'm not sure where to ask for help on this but I hope someone can offer some.  I'm at the point now where I'm trying to make my website live and the problem I've come across is updating my links, particularly the ones where I use header().

This is my first time putting a website online so this is all new to me.

 

This is my line of code..

 

header('Location: http://localhost/website/places.php');

 

 

I need to change this but I'm not sure what to change it to. My home path is..

/home/vol11/5gigs.net/fiveg_4348489

 

Do I need to use that??

 

I appreciate any help.

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/178359-solved-links-using-header/
Share on other sites

localhost in the header redirect that you posted is the domain portion of the URL. You need to use your actual domain name. You can use $_SERVER['HTTP_HOST'] to get the domain name at runtime, so you don't need to hardcode the domain into the php statement.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.