News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Creating another website along with the forum in the same host

Started by yasmikash, February 13, 2018, 06:43:32 AM

Previous topic - Next topic

yasmikash

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?

Kindred

set up a second database and then just run the install.php in your new directory
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

yasmikash

Quote from: Kindred on February 13, 2018, 09:49:32 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.

Kindred

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?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

yasmikash

Quote from: Kindred 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?

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/ [nofollow]dashboard, it redirects me to the forum with this url - myforum.com/dashboard/?pretty;board=dashboard.0 [nofollow]
Does prettyurls have to do with anything about this?

Kindred

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
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

yasmikash

Quote from: Kindred 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

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

# 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/ [nofollow]something, it throws out '404 Not Found' error, instead of redirecting back to my forum homepage. How do I get rid of this?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori

Quote from: Kindred on February 13, 2018, 10:28:08 PM
You disabled the showing of index.php, didn't you?

i believe that is part of the pretty urls mod.

yasmikash


Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: