1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Moved Installation Woes

Discussion in 'XenForo Questions and Support' started by hugh71158, Jul 15, 2013.

  1. hugh71158

    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
     
  2. Jeremy

    Jeremy XenForo Moderator Staff 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.
     
  3. hugh71158

    hugh71158 Member

    Wow, fast response. Thanks.

    Yes, it's in the sub-directory. I moved all files into it
     
  4. Jeremy

    Jeremy XenForo Moderator Staff 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?)?
     
  5. hugh71158

    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>
     
  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    Try this file:
    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.
     
  7. hugh71158

    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. :)
     
  8. hugh71158

    hugh71158 Member

    Wait, yes, now I see it. lol. Didn't work though.
     
  9. Jeremy

    Jeremy XenForo Moderator Staff Member

    The difference is highlighted in Red. Try this one:
    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.
     
  10. hugh71158

    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.
     
  11. DBA

    DBA Well-Known Member

    The last time I had an issue like this a restart of the httpd service fixed it.
     
    Tracy Perry likes this.
  12. hugh71158

    hugh71158 Member

    :) Lost me there. Restart?
     
  13. Jeremy

    Jeremy XenForo Moderator Staff 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?
     
  14. hugh71158

    hugh71158 Member

    shared server
     
  15. Jeremy

    Jeremy XenForo Moderator Staff Member

    You may be able to open a support ticket with your host to possibly get their help on this.
     
  16. hugh71158

    hugh71158 Member

    Thanks!
     
  17. Jake Bunce

    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.
     
  18. hugh71158

    hugh71158 Member

    Jake, do you mean access to my XenForo control panel, or my ISP account?

    Thanks
     
  19. Jeremy

    Jeremy XenForo Moderator Staff Member

    The server, so ISP account (if you are hosted at your ISP). Basically, the credentials you use to upload files for an update.
     
    hugh71158 likes this.
  20. hugh71158

    hugh71158 Member

    Well, after much ado I have decided to do a clean install. I absolutely appreciate your replies. :)

    Hugh
     

Share This Page