Hi i wan't to make the Index of / page invisable to people as when people go to my website http://civilization.site.nfoservers.com/ they will see all my folders. I wan't to default it to http://civilization.site.nfoservers.com/forum/
Thanks - Wayne
Making the Index of / invisable
-
- New to forums
- Posts: 3
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Wed May 14, 2014 3:13 am
Re: Making the Index of / invisable
There are several ways to redirect traffic to a subfolder:
- 1. Add the following lines to .htaccess (if you have one):
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$
RewriteRule ^(/)?$ blog [L]
The only change you need to make is to change “YourDomain.com” to your domain. This will then redirect everything from the domain to the folder /blog at that domain. If you want to change that folder just edit the “blog” part.
2.Using HTML: create an index.html file and add this:
<html>
<head>
<meta http-equiv="refresh" content="0;url=http://civilization.site.nfoservers.com/forum/ ">
</head>
<body>!--redirect traffic to the forum subdirectory--></body>
</html>
3. Using PHP: create an index.php file and add:
<?php
//redirect all traffic to the forum directory
header( 'Location: http://civilization.site.nfoservers.com/forum/ ' ) ;
?>