htaccess thread


Well-known member
Make sure when you upload your distribution to include the .htaccess in the the root "upload" directory. I thought mine was missing, but Mike verified that is should be in the download, which it is, but didn't get uploaded.

I'm not sure why the htaccess file wasn't FTP'd to my installation directory, when other directory restricting htaccess files (./library, ./install/templates,./install/data/,./internal_data) were uploaded.

If you're missing your forum root .htaccess file, it should look like this (please remove if this isn't allowed).
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data|js|styles|install) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]


Well-known member
Also, if you use the "Use Full Friendly URLs" option in the admincp after verifying your forum root .htaccess file exists, you might want to move your installation if you named the forum root "forum", because xenforo will rewrite the "node" forum URLs by default as:
(adding a superfluous"forums/" to the URI)

This only appears on the "node" forum links, the thread links work as expected.
So, you'd probably be better off naming your installation directory"xen", "xenforo", or "community", if it isn't your domains root directory.

And, I haven't seen an area to change the URL rewriting values, maybe that hasn't been implemented yet.

Andy Huang

Well-known member
Were you by any chance on a linux / mac system, and uploaded the directory from within? IE: drag and dropped contents from upload/ instead of uploading upload?

Linux / Mac systems will treat .anything file as a hidden file, so if you drag and dropped contents, then it would've missed that file. However, since it traverses through your sub directories, it automatically selected the .htaccess files in there.


Well-known member
I used winscp going to linux, and I guess I never noticed before, I usually have to come up with my own .htaccess rules, and not expect one to already be included! I guess that answers my question.