XF 1.5 Use Full Friendly URL's not working

Bonsai Coder

Active member
I have been working on this problem with my site for over a day now, and neither myself, nor Andy, nor my web host can figure it out (my web host tech has been working on it for 6 hours)...

My site: www.bonsainut.com

My site home page is in the root directory. My xenforo install is in /forums.

I have read and tried everything in the Use Full Friendly URL's FAQ/troubleshooting. I have read and tried every suggestion in every thread I can find on the subject. Specifically:

1) The .htaccess file is in place in my forum directory.

2) I have tried enabling RewriteBase in my .htaccess file (using both "/forums" and "/" paths).

3) My server has mod_rewrite installed.

4) My server has AllowOverride enabled.

Here is the .htaccess file in my root directory:

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^bonsainut.com [nc]
RewriteRule ^(.*)$ http://www.bonsainut.com/$1 [R=301,L]

Here is the .htaccess file in my /forums directory:

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>

When I enable Use Full Friendly URL's, I can navigate to my web site home page just fine, but I get an error when I try to navigate to my forums page (/forums).

Any suggestions?
 
Sorry to be so obtuse, but can you be extremely specific about what you did? I don't see any "rebuild cache" option in the tools section.

/EDIT If you mean just go through and run all the Chron Entries... I just did that, and it made no difference.
 
Last edited:
Thank you for the kick in the head Mike.

It has been a year since I installed XenForo and I mistakenly thought I had installed it in the /forums folder because... I saw a folder named forums :)

I combined my two .htaccess files into one and put it in the root:

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
   
    RewriteCond %{HTTP_HOST} ^bonsainut.com [nc]
    RewriteRule ^(.*)$ http://www.bonsainut.com/$1 [R=301,L]
   
    #    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 /

    #    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>

As you can see I also uncommented the RewriteBase line and used the "/" path for my root directory.

I am still having problems but here's the weird thing:

(1) I can cruise to the home page and see the FFURLs working fine.
(2) I can link to any thread content, and FFURLs are working fine.
(3) I can click any of the tabs on the home page EXCEPT FORUMS, and FFURLs are working fine (Media, Shoutbox, Resources, Members)
(4) On the home page, I can click any of the subtabs and FFURLs are working fine (Watched Forums, Watched Threads, New Posts, Recent Activity).
(5) I can link to any of the individual forums and FFURLs are working fine... in other words if I click on a thread content link, and then click on the tab at the top of the page, I can navigate to the forum thread listing, and everything works fine.

It appears the only thing I have problems with is (1) the forums home page and (2) forums category pages.

I get the "Forbidden You don't have permission to access /forums/ on this server error.
 
That would be down to the forums/ directory that exists. If you don't have any reason to do that, you need to remove it. (You can't have URLs that link into a directory that exists.)
 
That sounds like a server security issue - something related to mod_security or similar.

Your host should be able to identify the rule which is causing it and resolve it.

Truly my web host worked on it all day yesterday with no success - first one tech and then a second. They confirmed mod_rewrites, and then confirmed allow overrides. They even ran a script confirming all file permissions...
 
The problem was solved... by commenting out a line in the .htaccess file.

"It looks like there is some issue with this line in your htaccess file. Commenting it out 'solves' the problem.
ErrorDocument 403 default"

They are doing some more research to try to determine why this problem is occurring.
 
Ok so here's the issue / solution for anyone following this thread.

The issue is that I have a custom home page. On the Index Page Route (Basic Board Information) I have the entry "articles/" because that is the name of my home page. When you go to www.bonsainut.com, you are NOT taken to the forums home page, but rather to a custom widget framework.

Entering a different Index Page Route is causing "Use Full Friendly URL's" to generate errors. You can block these errors by commenting out "ErrorDocument 403 default" in the .htaccess file. It doesn't "fix" the issue, but provides a cludgy workaround.

I'll leave it up to xenforo to decide how to fix the software so that entering a custom index page route AND enabling Use Full Friendly URL's doesn't generate errors.

Or... better yet.... XenForo 2.0 will offer a widget framework home page... which would make me EXTREMELY happy.
 
I honestly don't know what else to do or where else to turn. For now, I am using the Full Friendly URL's, but commenting out the .htaccess line. Why would it work for some people and not for others? I have no idea.

All I will tell you is that I can start with a default (blank) index page route entry, enable Full Friendly URL's, and my site works fine... including the home page at www.bonsainut.com/articles. The second I enter "articles/" in my index page route, it starts generating 403 errors... but everything else works fine.
 
That would be down to the forums/ directory that exists. If you don't have any reason to do that, you need to remove it. (You can't have URLs that link into a directory that exists.)
I think Mike already gave the right solution.

Inside your XenForo root do you have a forum directory? If so, do you need to have a forum directory? If not, remove it (or rename it temporarily) and try again. I'm betting that will work.
 
I think Mike already gave the right solution.

Inside your XenForo root do you have a forum directory? If so, do you need to have a forum directory? If not, remove it (or rename it temporarily) and try again. I'm betting that will work.

I didn't understand Mike's comment. Yes, there was a forums directory in the root... and to be honest I have no idea what purpose it serves. It may have been an artifact from my server migration and/or my old vBulletin install.

I changed the name... and the issue was resolved.

I don't pretend to understand why this was causing issues.... but I am glad that it was resolved. Thank you for all your help.
 
Back
Top Bottom