MyBB Community Forums

Full Version: Why does directory always show up?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello myBB people,

Today I have been experiencing some problem as when I go to my website it always goes to the directory
and I want it to got to the myBB folder. Or if you can redirect the website to got to that page right away.


If you need any other information just quote me and I will try to get to you ASAP!


Information
Website: evoforums.ga
MyBB Version: 1.8.14
PHP Version: 7.0.19
You should have placed all your file inside MyBB folder to your web root.
If you at all want to keep the folder 'MyBB' for some reason and access the site through root url (http://evoforums.ga instead of http://evoforums.ga/mybb) then you need to mod rewrite through htaccess.

Something like this should work:

RewriteEngine on
RewriteRule ^(.*) mybb/$1 [L]

Put these two lines in a text file. rename it to ".htaccess" and upload this file where your "mybb" directory is (not inside the directory).
Create a .htaccess in your sites root with the following code :
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/

Just replace
http://www.domain.com/subfolder/
with your domain and the directory you installed MyBB in.

See more redirects codes?
I will still suggest to use rewrite rule rather than redirect.
Rewrite condition can contain wildcard matching to catch any and every calls in current scenario.
For redirect separate declarations might have been required to catch 'www' sub and / or http / https protocols.
Also redirect is client side request whereas rewrite is server side.
(2018-03-15, 02:36 AM)effone Wrote: [ -> ]You should have placed all your file inside MyBB folder to your web root.
If you at all want to keep the folder 'MyBB' for some reason and access the site through root url (http://evoforums.ga instead of http://evoforums.ga/mybb) then you need to mod rewrite through htaccess.

Something like this should work:

RewriteEngine on
RewriteRule ^(.*) mybb/$1 [L]

Put these two lines in a text file. rename it to ".htaccess" and upload this file where your "mybb" directory is (not inside the directory).
It says this

Quote:Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

(2018-03-15, 02:41 AM)Brian. Wrote: [ -> ]Create a .htaccess in your sites root with the following code :
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/

Just replace
http://www.domain.com/subfolder/
with your domain and the directory you installed MyBB in.

See more redirects codes?
Dosent work it just keeps redirecting 
this is how it looks 
http://www.evoforums.ga/mybb/mybb/mybb/m...mybb/mybb/
Give this one a try :


RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} domain.com [NC]
RewriteRule ^(.*)$ http://domain.com/directory/index.html [R=301,NC]

Replace
domain.com
with your domain and replace
http://domain.com/directory/index.html
with your domain and the directory you have MyBB installed in

This may not work if doesn't let me know also look at more redirects codes here.
The code I have provided is tested and works for sure.
If you have created and uploaded the file properly it should work.
You are facing an infinite loop and upon reaching the max loop limit apache throws 500.
Clear your browsing data and retry or use a different browser to check. Sometimes thats an issue.
(2018-03-15, 05:33 PM)effone Wrote: [ -> ]The code I have provided is tested and works for sure.
If you have created and uploaded the file properly it should work.
You are facing an infinite loop and upon reaching the max loop limit apache throws 500.
Clear your browsing data and retry or use a different browser to check. Sometimes thats an issue.
Ok i think I have placed it wrong the place wher it is right 

/evoforums.ga/htdocs/mybb
I also tried 
/evoforums.ga/htdocs/
and
/evoforums.ga/

they all dont work keeps saying the same message
You have to upload it to:
/evoforums.ga/htdocs/

parallel to mybb folder (same depth), not inside it.
Have you cleared browsing data or tried with other browser?

attaching the .htaccess for your ease. Rename it to .htaccess (remove .txt extension part) and upload.

Again, importantly, Clear Browsing Data / Use other browser.
I see your theme is a premium theme from MySkins (http://myskins.org/Thread-Release-DarkDe...MyBB-Theme) please PM me or post proof of purchase but make sure not to show any personal information but for now no more support will be provided from me until I see purchase proof.

Thanks!