XenForo : How to get Friendly URL to work

If you don’t use managed hosting solutions for your forums, you might have to install everything yourself.

By default the directive for AllowOverride is set to None, meaning even if you enable the friendly urls in XenForo, it will show you 404 not found pages.

Step 1.

If you already have a .htaccess file, get the appropriate content from htaccess.txt provided by XenForo and apply it properly to your existing .htaccess file.

Otherwise, rename htaccess.txt to .htaccess.

Make sure your .htaccess file for XenForo is in the public html directory from where you run XenForo.

Step 2.

Edit the .htaccess file, and find the commented #RewriteBase /xenforo line and change it to:

RewriteBase /

Step 3.

Make sure your Apache2 web server has mod_rewrite installed. Ssh to the server with a user that can sudo up, and type:

sudo a2enmod rewrite

Step 4.

Find your apache.conf in /etc/apache2/ and edit it with nano, finding the directive for /var/www, and change None to All.

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
</Directory>

And finally, restart apache:

sudo service apache2 restart

 


Posted

in

by

Tags: