tsincaat Posted June 5, 2008 Share Posted June 5, 2008 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 More sharing options...
Synook Posted June 5, 2008 Share Posted June 5, 2008 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 More sharing options...
tsincaat Posted June 5, 2008 Author Share Posted June 5, 2008 Thank you. You make a good point. I wanted to know for future reference. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.