Moving to the root

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Lord Phobos
Registered User
Posts: 567
Joined: Tue May 18, 2004 11:41 pm

Moving to the root

Post by Lord Phobos » Thu Sep 13, 2018 2:24 am

Hi all!

I need to move my board from its current /forum location to my root.
I'm afraid to do it.

In the root I had a wordpress site that I now deleted completely (removed all files, deleted the db).
The root folder has its .htaccess file, and the /forum folder has its own.

What are the correct steps in the correct order I should take to keep everything ok?
Database, style, links, extensions, settings... everything.

I'll paste you my .htaccess files:

ROOT (the old wordpress one):

Code: Select all

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

/FORUM (the phpbb current folder):

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine on

#
# Uncomment the statement below if URL rewriting doesn't
# work properly. If you installed phpBB in a subdirectory
# of your site, properly set the argument for the statement.
# e.g.: if your domain is test.com and you installed phpBB
# in http://www.test.com/phpBB/index.php you have to set
# the statement RewriteBase /phpBB/
#
#RewriteBase /forum

#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

#
# The following 3 lines will rewrite URLs passed through the front controller
# to not require app.php in the actual URL. In other words, a controller is
# by default accessed at /app.php/my/controller, but can also be accessed at
# /my/controller
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app.php [QSA,L]

#
# If symbolic links are not already being followed,
# uncomment the line below.
# http://anothersysadmin.wordpress.com/2008/06/10/mod_rewrite-forbidden-403-with-apache-228/
#
#Options +FollowSymLinks
</IfModule>

# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
	<IfVersion < 2.4>
		<Files "config.php">
			Order Allow,Deny
			Deny from All
		</Files>
		<Files "common.php">
			Order Allow,Deny
			Deny from All
		</Files>
	</IfVersion>
	<IfVersion >= 2.4>
		<Files "config.php">
			Require all denied
		</Files>
		<Files "common.php">
			Require all denied
		</Files>
	</IfVersion>
</IfModule>
<IfModule !mod_version.c>
	<IfModule !mod_authz_core.c>
		<Files "config.php">
			Order Allow,Deny
			Deny from All
		</Files>
		<Files "common.php">
			Order Allow,Deny
			Deny from All
		</Files>
	</IfModule>
	<IfModule mod_authz_core.c>
		<Files "config.php">
			Require all denied
		</Files>
		<Files "common.php">
			Require all denied
		</Files>
	</IfModule>
</IfModule>
php_value error_reporting       2039
php_flag  display_errors        on
RewriteCond %{HTTP_HOST} anonimagiocatori\.it [NC]
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ https://www.anonimagiocatori.it/$1 [R,L]

Thanks a lot in advance!

User avatar
Lumpy Burgertushie
Registered User
Posts: 65185
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Moving to the root

Post by Lumpy Burgertushie » Thu Sep 13, 2018 2:36 am

if you have "force url" set to yes in the admin panel server settings then switch it to no before you do this.

remove the wordpress htaccess file. move ALL of the files from the "forum" directory up to the root directory.

done.

if your board has been around and is indexed in the search engines then you may want to put a permanent 301 redirect in your phpbb htaccess file.


you can google for the proper way to do that.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
</Solidjeuh>
Registered User
Posts: 1069
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Moving to the root

Post by </Solidjeuh> » Thu Sep 13, 2018 2:37 am

Delete ALL files from the root folder, and just move you phpBB file to the root.
See: viewtopic.php?f=46&t=2135127#p13025784
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20237
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Moving to the root

Post by Mick » Thu Sep 13, 2018 6:53 am

You don't even have to move the board files if that concerns you, just copy them and you can remove the old folder once you're happy.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

Lord Phobos
Registered User
Posts: 567
Joined: Tue May 18, 2004 11:41 pm

Re: Moving to the root

Post by Lord Phobos » Fri Sep 14, 2018 12:21 am

Many thanks all!

And what about the .htaccess?

User avatar
Lumpy Burgertushie
Registered User
Posts: 65185
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Moving to the root

Post by Lumpy Burgertushie » Fri Sep 14, 2018 12:27 am

you must remove the wp htaccess file completely.
phpbb does not really need a htaccess in order to operate but there is really no reason to remove it.

just get rid of all the wp stuff and move the files/folders of phpbb into the root and you are done.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

Lord Phobos
Registered User
Posts: 567
Joined: Tue May 18, 2004 11:41 pm

Re: Moving to the root

Post by Lord Phobos » Fri Sep 14, 2018 2:26 am

It all worked, really thanks!


I've got just a strange and annoying issue: everytime I log into ACP, and then I reload the index page... when I click again on th ACP link i get an HTTP ERROR 401.
In other words, I can only login to my ACP once, the second time I get this error.
The only way to solve it is manually deleting every cookie related to my domain.
Obviously something went wrong, but what?

Thanks in advance.


Ps
I changed my script and path cookie as suggested.

User avatar
Lumpy Burgertushie
Registered User
Posts: 65185
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Moving to the root

Post by Lumpy Burgertushie » Fri Sep 14, 2018 5:06 am

need a link to the board so we can check cookies etc.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

Lord Phobos
Registered User
Posts: 567
Joined: Tue May 18, 2004 11:41 pm

Re: Moving to the root

Post by Lord Phobos » Fri Sep 14, 2018 11:30 am


User avatar
Mick
Support Team Member
Support Team Member
Posts: 20237
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Moving to the root

Post by Mick » Fri Sep 14, 2018 11:44 am

You need to set cookie secure to yes if you're using https.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

Lord Phobos
Registered User
Posts: 567
Joined: Tue May 18, 2004 11:41 pm

Re: Moving to the root

Post by Lord Phobos » Fri Sep 14, 2018 11:52 am

It is already enabled.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20237
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Moving to the root

Post by Mick » Fri Sep 14, 2018 12:05 pm

Look in cookie settings for cookie secure, that should be enabled and I'm seeing it as disabled. Knowledge Base - Fixing incorrect cookie settings may help.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7412
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Moving to the root

Post by JimA » Fri Sep 14, 2018 12:12 pm

You could also try to slightly change the cookie name so the new cookie settings will go into effect as it forces the use of a new cookie.
Image Jim Mossing Holsteyn - Community Team Leader
Knowledge Base | Documentation | Board rules

If you're having any questions about the rules/customs of this website, feel free to drop me a PM.

Lord Phobos
Registered User
Posts: 567
Joined: Tue May 18, 2004 11:41 pm

Re: Moving to the root

Post by Lord Phobos » Fri Sep 14, 2018 12:12 pm

I didn't change it.
Attachments
cookie.png

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20237
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Moving to the root

Post by Mick » Fri Sep 14, 2018 12:50 pm

Yes it looks set correctly, can you try:
JimA wrote:
Fri Sep 14, 2018 12:12 pm
slightly change the cookie name so the new cookie settings will go into effect [immediately]
and try disabling then re-enabling cookie secure. Do you know if you have a third party cache running on your server? Also are you using a proxy? I've seen some odd stuff with cookies with proxies.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: wedgef5 and 35 guests