XF 1.5 Full Friendly URLs Caused 404 Errors

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:

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 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]
</IfModule>

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.

JF
 
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.

JF
 
Last edited:
How can forums/. be correct? There is no forums/ directory.
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/

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.
The help page referenced to says:
If, after enabling friendly URLs your XenForo installation does not function correctly, please contact your host to confirm that they have mod_rewrite installed and allow overrides via an .htaccess file.

You need to confirm that and also that your .htaccess is correct. This is a configuration issue, not a Xenforo issue.
 
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.)

JF
 
Back
Top Bottom