MyBB Community Forums

Full Version: Removing Index of / page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi, i'm using MyBB for the first time and today i installed it, but the problem is that when i open my site there's an Index page showing "Index of / forum" and when i click on forum i got to the forum, but i want that when type the link to my site to open it normally as is, not with Index of / page.

I search here at the forum for threads about redirecting but as i say - i'm new and i don't understand what should i type inside htacess file.

Is there anyone who can help me?
Simply create a redirect in your cPanel.

FROM: www.yourdomain.com/
TO: www.yourdomain.com/forum

If you need help on that view:
http://www.everymanhosting.com/cpanel-tu...cpanel.php

for a video tutorial.
(2012-04-04, 11:50 PM)iHydra Wrote: [ -> ]Simply create a redirect in your cPanel.

FROM: www.yourdomain.com/
TO: www.yourdomain.com/forum

If you need help on that view:
http://www.everymanhosting.com/cpanel-tu...cpanel.php

for a video tutorial.


Thanks for the info, man, but i want to know how i can do that without from the cPanel Sad
(2012-04-04, 11:53 PM)Josh23 Wrote: [ -> ]
(2012-04-04, 11:50 PM)iHydra Wrote: [ -> ]Simply create a redirect in your cPanel.

FROM: www.yourdomain.com/
TO: www.yourdomain.com/forum

If you need help on that view:
http://www.everymanhosting.com/cpanel-tu...cpanel.php

for a video tutorial.


Thanks for the info, man, but i want to know how i can do that without from the cPanel Sad

Do you have FTP Access?

Add this line into .htaccess

Redirect /index.html http://example.com/newdirectory/

Replace 'example' and 'newdirectory'
Yep, i have FTP acess and that's what i type inside the htacess file -

Redirect /index.html http://www.mysitename.net16.net/forum/

It's not working because, it's again the same. When i type http://www.mysitename.net16.net it's not redirecting to http://www.mysitename.net16.net/forum and the Index of / page is again there.

I'm using 000webhost for hosting and domain.

All the files are inside public_html folder and maybe that's the problem.
(2012-04-05, 12:04 AM)Josh23 Wrote: [ -> ]Yep, i have FTP acess and that's what i type inside the htacess file -

Redirect /index.html http://www.mysitename.net16.net/forum/

It's not working because, it's again the same. When i type http://www.mysitename.net16.net it's not redirecting to http://www.mysitename.net16.net/forum and the Index of / page is again there.

I'm using 000webhost for hosting and domain.

All the files are inside public_html folder and maybe that's the problem.

It's supposed to be in public_html

I don't see why it wouldn't work.

try this in .htaccess

RedirectMatch 301 /index.php(.*) /forums/$1
 

rename forums to the correct subdirectory
The same thing (it's not working).

This is how htacess is looking (i talk about the htacess.txt (i have renamed it to .htacess) file that's inside with the files for MyBB) :

Options -MultiViews +FollowSymlinks -Indexes

RedirectMatch 301 /index.php(.*) /f/$1

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
#   MediaTemple, it is known to cause random Internal Server
#   errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
	# Turn off mod_security filtering.
	SecFilterEngine Off

	# The below probably isn't needed, but better safe than sorry.
	SecFilterScanPOST Off
</IfModule>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
#   the setting enabled in the Admin CP and you have this file
#   named .htaccess
#
<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
	RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

	RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
	RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
	RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
	RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
	RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
	RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
	RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

	RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

	RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

	RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

	RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)\.html$ calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

	RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]

	<IfModule mod_env.c>
		SetEnv SEO_SUPPORT 1
	</IfModule>
</IfModule>

#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE application/javascript text/css text/html text/xml
</IfModule>

I don't know what's going on and why it's not working, but maybe i'm doing something wrong.
Put

"Redirect /index.html http://example.com/newdirectory/"

at the end of htaccess
Redirect 301 index.html http://yourforum.com/forums
iHydra, GamerVoid, it's not working again.

I tried with the both Redirect /index.html http://mysite.net16.net/forum and Redirect 301 index.html http://mysite.com/forum in the end and in the start of the file and again the Index of / page is there. I have tried many times and changed the positions of the code (in the start of the file, in the end, middle) and nothing....

I don't know what's going on but if someone can do something i'll give him the FTP details.

-

I forgotten to say that i talk about the non-www version of the site.

If i type the link to the site with www. it's redirecting to the forum, not first to Index of /, but if i type the link to the site without www. it's opening the Index of / page first and when i click on forum it's opening the forum.

Nevermind, i just want that when i type the site adress (with www. and without) the link to the site to be www.mysite.com/forum, not www.mysite.com.

That's all that i want to know how i can do that redirection to the main page of the site to the forum page where exactly is the main site (forum).
Pages: 1 2