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

XF 1.3 Xenforo .htaccess | mod_rewrite? wut

Discussion in 'Troubleshooting and Problems' started by Riaz, Apr 2, 2015.

  1. Riaz

    Riaz Member

    Basically Ive used my forum for a looong time now. And always had " Use Full Friendly URLs" disabled.

    Ive tried enabling it but it causes links on the forums not to work. (Send me to a 404 page).
    I am aware of the desc. Provided under the Use Full Friendly URLs option. But I am not a expert at this, and Im not sure how to get this right:
    "However, to enable this, mod_rewrite must be available and an appropriate .htaccess .file must be in place."
    I have the .htaccess.txt file inside my /forum directory.
    And it looks like this:

    #    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 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]
    Im not sure what mod_rewrite is either.. All I really want to do is get this small issue fixed so I can finally remove index.php from my urls!

    Thanks for any advice.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    If you aren't sure, contact your host to confirm that they have mod_rewrite installed and allow overrides via an .htaccess file.
  3. Riaz

    Riaz Member

    I have a dedicated Server so yea. My Hosting doesnt really provide that type of Support. But I looked around and tried this guide:
    But I still get the error after changing AllowOverride None to All on all of them in the file and enabling mod_rewrite..
  4. Luke F

    Luke F Well-Known Member

    It should be named .htaccess not .htaccess.txt
  5. Riaz

    Riaz Member

    Yea I had one .htaccess and one .htaccess.txt but yea i renamed it and made it a file instead but it didnt change anything :S
  6. Tracy Perry

    Tracy Perry Well-Known Member

    There is also an apache config setting you usually have to change... I don't remember what it was (I use nginx) but it was anAllowOverride setting somewhere in the directory setting (I think).

Share This Page