Advertisement:

Author Topic: Creating another website along with the forum in the same host  (Read 436 times)

Offline yasmikash

  • Semi-Newbie
  • *
  • Posts: 16
Creating another website along with the forum in the same host
« on: February 13, 2018, 06:43:32 AM »
I have a forum built using Simple Machines Forum under the main domain. I'm trying to make another website on a different directory in the same host that my forum has been installed on, and use www. myforum .com/mywebsite as the web address of that website. I have no idea how to do that on my own 'cause i'm a very beginner to this stuff  :P. Can you guys help me with that?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,102
  • Gender: Male
    • Kindred-999 on GitHub
Re: Creating another website along with the forum in the same host
« Reply #1 on: February 13, 2018, 09:49:32 AM »
set up a second database and then just run the install.php in your new directory
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline yasmikash

  • Semi-Newbie
  • *
  • Posts: 16
Re: Creating another website along with the forum in the same host
« Reply #2 on: February 13, 2018, 10:45:59 AM »
set up a second database and then just run the install.php in your new directory
Thank you for your reply. I have created a sub-folder and included all the necessary contents into it, but when I access the site using the url, it redirects me to the homepage of the forum. Is there any wrong I'm doing here, and sorry for being a noob.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,102
  • Gender: Male
    • Kindred-999 on GitHub
Re: Creating another website along with the forum in the same host
« Reply #3 on: February 13, 2018, 11:12:33 AM »
what are the URLs involved.

When you say that you "included all the necessary contents into it", what do you mean? 

Did you create a new database?
Did you put the install archive in the directory and then extract the files/sub-directories?

Do you, perhaps, have an htaccess file in your root that automatically tries to redirect anything?
Is the forum in your root directory using prettyurls?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline yasmikash

  • Semi-Newbie
  • *
  • Posts: 16
Re: Creating another website along with the forum in the same host
« Reply #4 on: February 13, 2018, 01:15:43 PM »
what are the URLs involved.

When you say that you "included all the necessary contents into it", what do you mean? 

Did you create a new database?
Did you put the install archive in the directory and then extract the files/sub-directories?

Do you, perhaps, have an htaccess file in your root that automatically tries to redirect anything?
Is the forum in your root directory using prettyurls?

I mean by "necessary contents" that all the website files, and, yes, I installed a new database and assigned the details to the website.

There is no htaccess file in my root directory.

I had used prettyurls on my forum for a while, but now I have removed it from my forum.

My sub-directory folder name is 'dashboard', so every time I try to access to website through the address myforum.com/dashboard, it redirects me to the forum with this url - myforum.com/dashboard/?pretty;board=dashboard.0
Does prettyurls have to do with anything about this?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,102
  • Gender: Male
    • Kindred-999 on GitHub
Re: Creating another website along with the forum in the same host
« Reply #5 on: February 13, 2018, 02:46:19 PM »
you still have pretty urls active, then.... that's the problem.

and there must be an .htaccess file in your root...   that's how pretty urls does the redirect
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline yasmikash

  • Semi-Newbie
  • *
  • Posts: 16
Re: Creating another website along with the forum in the same host
« Reply #6 on: February 13, 2018, 09:51:08 PM »
you still have pretty urls active, then.... that's the problem.

and there must be an .htaccess file in your root...   that's how pretty urls does the redirect

Ok. There is a .htaccess file in my root directory.

Code: [Select]
# PRETTYURLS MOD BEGINS
# Pretty URLs mod
# http://code.google.com/p/prettyurls/
# .htaccess file generated automatically on: December 23, 2017, 12:16

RewriteEngine on
RewriteBase /

# Rules for: profiles
RewriteRule ^profile/([^/]+)/?$ ./index.php?pretty;action=profile;user=$1 [L,QSA]

# Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]

# PRETTYURLS MOD ENDS
#Remove index.php completely via htaccess Mod
#Remove index.php completely via htaccess Mod
RewriteEngine on
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
#Remove index.php completely via htaccess Mod
#Remove index.php completely via htaccess Mod

Should I remove the .htaccess file, or is there something to change in the file?

Edit:
And it works after I removed the .htaccess file in my root directory, but there is another problem. When someone try accessing website using an address like this - myforum.com/something, it throws out '404 Not Found' error, instead of redirecting back to my forum homepage. How do I get rid of this?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,102
  • Gender: Male
    • Kindred-999 on GitHub
Re: Creating another website along with the forum in the same host
« Reply #7 on: February 13, 2018, 10:28:08 PM »
You disabled the showing of index.php, didn’t you?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 49,848
Re: Creating another website along with the forum in the same host
« Reply #8 on: February 14, 2018, 05:11:40 AM »
You disabled the showing of index.php, didn’t you?

i believe that is part of the pretty urls mod.

Offline yasmikash

  • Semi-Newbie
  • *
  • Posts: 16
Re: Creating another website along with the forum in the same host
« Reply #9 on: February 14, 2018, 06:55:14 AM »
You disabled the showing of index.php, didn’t you?
Yes. I have disabled showing index.php.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,102
  • Gender: Male
    • Kindred-999 on GitHub
Re: Creating another website along with the forum in the same host
« Reply #10 on: February 14, 2018, 09:48:58 AM »
that causes all sorts of problems.  don't do that.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.