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

XF 1.5 Unable to set up Friendly URLS

Discussion in 'Troubleshooting and Problems' started by tribedude, Jun 6, 2016.

  1. tribedude

    tribedude Active Member

    I went into Options/Help Pages and created a help page called terms with some basic html content in it and put "terms" in the URL portion. Saved. Then went into options/basic board info/terms and rules url and selected the default, which is http://www.tinyhouseforum.net/help/terms , where that page should be, yet i get this error:

    Not Found

    The requested URL /help/terms was not found on this server.

    what am i doing wrong here?
  2. tribedude

    tribedude Active Member

    I just had a look at the server and the /help/terms directories don't exist so I guess they weren't created by XF. How can I fix that? I guess I could create them manually on the server, but doesn't that defeat the purpose of the control panel?
  3. James

    James Well-Known Member

    Have you enabled friendly URLs? If not the page will be index.php?help/terms/
  4. tribedude

    tribedude Active Member

    I have enabled friendly URLS.

    Also after some checking, I see that none of my created content works - it all seems to generate page not found errors. It is a very new installation and I have just created a couple of empty forums and the help page, none of which work.

    How can I fix that?
  5. James

    James Well-Known Member

    If you've enabled the URLs can you confirm that the rewrites are in place in your .htaccess file?


    Or alternatively disable friendly URLs and see if your site works normally again, both will identify the problem.
  6. tribedude

    tribedude Active Member

    I disabled friendly URLS and the site does work normally. I would like friendly URLs however.

    I have followed https://xenforo.com/help/friendly-urls/ as best I can but obviously I am doing something wrong or missing something.

    I just did a phpinfo and see that mod_rewrite is loaded. My .htaccess file is below:

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

    I am not really sure where to put that allow overrides line though... It is not clear in the XF documentation.
  7. James

    James Well-Known Member

    You have your rewrite base set to /xenforo - does this relate to the root installation of your forum?
  8. tribedude

    tribedude Active Member

    The forum is in the root of our domain, (tinyhouseforum.net) so do I still set the rewrite base to /xenforo?
  9. tribedude

    tribedude Active Member

    How do I create that rewrite base line if my forum is in the root of the domain?
  10. Solidus

    Solidus Well-Known Member

    Replace RewriteBase /xenforo with RewriteBase /
  11. tribedude

    tribedude Active Member

    I have done that and Friendly URLS still do not function and generate 404 errors...
  12. tribedude

    tribedude Active Member

    I guess the only thing left to try is the ' allow overrides' line, but I don't know where to put that or what parameters it should have...
  13. James

    James Well-Known Member

    Have you got any other .htaccess files on your server?

    Is the location of the .htaccess pasted above in the forum room (domain root)?

    Are you running an apache server or lightppd or nginx etc?
  14. tribedude

    tribedude Active Member

    We do not have another .htaccess file on the server
    The .htaccess file is located in the domain root.
    We are running apache and mod_rewrite is loaded
  15. Mike

    Mike XenForo Developer Staff Member

    The simplest way to sort this would be to look in your httpd.conf file and change any "AllowOverride None" lines to "AllowOverride All" and then restart Apache.
    AndyB likes this.
  16. tribedude

    tribedude Active Member

    That solved the issue. Thank you for your help everyone.

Share This Page