XF 1.1 Moved Installation Woes

hugh71158

Member
Hi,

so, I have my software installed in the root folder, and I want to move it into a sub folder like so: www.mysite.com/forum

I created the sub folder, copied all files into it, and changed the URL in the ACP. If I go to the new URL, I find my forum.

But, any forum links that I click just five me a "NOT FOUND" message. I am sure I just need to update the paths somewhere, problem is, where???? I am using version 1.1.4

If replying, please bear in mind that I am have no idea about certain files, or how the should be written (.htaccess being one of those) An idiot proof reply would be great.

Thans VERY much in advance!!! :)

Hugh
 

Jeremy

Well-known member
Do you have a .htaccess file within your new forum directory? If not, copy the one from your root directory into the sub-directory.
 

Jeremy

Well-known member
Do you have a link to your forum? What is the content of your .htaccess? I'm guessing you have full friendly URLs enabled (as in with this community where you don't see index.php?)?
 

hugh71158

Member
Ah, if I switch off the "friendly URL's" then it all works. Is that the best solution? The site (work in progress!) is now at www.photographerinc.com/forum
.htaccess says:

# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
RewriteEngine On

# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo

# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 

Jeremy

Well-known member
Try this file:
Rich (BB code):
# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
RewriteEngine On

# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
RewriteBase /forum

# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
Its an issue with your .htaccess failing to rewrite your URLs properly.
 

hugh71158

Member
Hi, no, still wont work with friendly URL's checked.

Did you sent the right file? I'm not seeing the difference between the .htaccess I posted and the one you posted. :)
 

Jeremy

Well-known member
The difference is highlighted in Red. Try this one:
Rich (BB code):
# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
RewriteEngine On

# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
# RewriteBase /forum

# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ /forum/index.php [NC,L]
</IfModule>
The error seems that its looking for the index in the root.
 

hugh71158

Member
Nope, it just doesn't want to play. Still not working.

Yeah, I see the red text now. I had copied it into a new .htaccess file, losing the color formatting. (slaps palm to forehead!)

Does it matter that the root folder is completely empty at the moment? I guess it shouldn't. Oh well, if it has to be "unfriendly URL's" then so be it. I don't want to keep taking up your time, and just wanted to say that I really appreciate your helping with trying to solve this.
 

Jeremy

Well-known member
No problem at all, but I'm out of ideas. @Jake Bunce is a ninja with these rewrites. You could also try what DBA suggests. Are you on shared, VPS, or a Dedicated Server?
 

Jeremy

Well-known member
You may be able to open a support ticket with your host to possibly get their help on this.
 

Jake Bunce

XenForo moderator
Staff member
You already tried what I would have suggested (make sure htaccess exists in /forum, and try setting RewriteBase). If the problem persists then send me a PM with FTP access to your server and I will take a look.
 

Jeremy

Well-known member
The server, so ISP account (if you are hosted at your ISP). Basically, the credentials you use to upload files for an update.
 
Top