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

XF 1.5 Full Friendly URLs Caused 404 Errors

Discussion in 'Troubleshooting and Problems' started by LT Jennifer, Oct 28, 2015.

  1. LT Jennifer

    LT Jennifer Member

    I tried switching Full Friendly URLs back on again. After I did so, I went to check my conversations and got a 404 error. It could not find the page www.alemontree.eu/forum/conversations/ . The problem went away when I turned it off again.

    In www.alemontree.eu/forum is an .htaccess file containing:

    #   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
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 405 default
    ErrorDocument 406 default
    ErrorDocument 500 default
    ErrorDocument 501 default
    ErrorDocument 503 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]
    Should I have moved this file from www.alemontree.eu/forum to www.alemontree.eu ? Should I uncomment and update the #RewriteBase line?

    My web site runs under Apache 2.2 on a commercial server. It is at www.alemontree.eu , and in the root of same is a web page that acts like a "password gate" -- if you click on the w, it executes an <a ...>www.alemontree.eu/forum</a>, which gets you to the forum list.

  2. Mike

    Mike XenForo Developer Staff Member

    You can attempt to uncomment the RewriteBase line (change the value to /forum), though I think that's unlikely to be the cause. Make sure you're looking at the .htaccess file and not the htaccess.txt.

    If it's still not working, see the Apache section here: https://xenforo.com/help/friendly-urls/
  3. LT Jennifer

    LT Jennifer Member

    Looking around, I saw that Admin > Home > Options > Basic Board Information > Index Page Route had been set wrong. It was set to forums/ but should have been forum/. But when I changed it to forum/ and attempted to log on, but it said the requested page could not be found. The page it was looking for was www.alemontree.eu/forum/index.php , and that page certainly does exist according to FileZilla, I'm still getting the message. There's some sort of URL name translation going on.

    Yes, it's .htaccess I'm looking at, not htaccess.txt. Yes, I read the Apache section, and I have done all that.

    I can try uncommenting RewriteBase and see what happens.

    I have now opened a support ticket.

    Last edited: Oct 28, 2015
  4. Mike

    Mike XenForo Developer Staff Member

    The original forums/ value is correct. You should change that back.

    You'd need to contact your host about it, as it requires settings/modules to be enabled in your web server.
  5. LT Jennifer

    LT Jennifer Member

    How can forums/. be correct? There is no forums/ directory.

    I have opened a support ticket and sent it to the correct destination.

  6. LT Jennifer

    LT Jennifer Member

    More information: on www.alemontree.eu/forum there are both .htaccess and htaccess.txt, but they are identical.

    I believe this is a Xenforo issue, not a host issue.

  7. Andrej

    Andrej Well-Known Member

    The setting is called "Index Page Route". It has nothing to do with the directory the forum is in. If you want show the forum list on the index page, it has to be set to forums/ because without the "s" it is invalid. The relevant help article can be found here: https://xenforo.com/help/set-index-page/

    The help page referenced to says:
    You need to confirm that and also that your .htaccess is correct. This is a configuration issue, not a Xenforo issue.
  8. LT Jennifer

    LT Jennifer Member

    All right, I set it back to forums/. It is just a little bit confusing.

    That still leaves me with my Friendly URL problem.

  9. LT Jennifer

    LT Jennifer Member

    I finally got Friendly URLs to work. I did so by creating an .htaccess file in both the web space root (www.alemontree.eu/) and the forum root (www.alemontree.eu/forum/). The file is the same in both cases; the only change from the file as distributed with the software was to change "#RewriteBase /xenforo" to "RewriteBase /forum".

    <big sigh of relief>

    Only 9 more hours until launch! (And no more clicking on the w.)


Share This Page