Jump to content

Setting up a page, blog, etc as the default


tsincaat

Recommended Posts

Lets say I'm making a blog. I want my website (www.example.com) when entered into a web browser to go straight to my blog. Do I have to install the blog in my default site directory (Not in its own folder), or is there a way I can automatically send people entering my URL to the blog's directory (www.example.com/blog)?

Link to comment
Share on other sites

You can redirect through HTML, JavaScript or server-side with code in your index file

<!-- PHP --><?php	header("location:blog/");?><!-- HTTP-equivalent --><meta http-equiv="refresh" content="0; blog/" /><!-- JavaScript --><script type="text/javascript">	window.location = "blog/";</script>

But if there is nothing else on the site, why not put it in the web root?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...