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

Full Friendly URLS install tweak for Apache2

Discussion in 'Installation, Upgrade, and Import Support' started by AFP, Jun 18, 2012.

  1. AFP

    AFP New Member

    Hopefully this can help someone in the future, and maybe get incorporated into the FAQ about this here, which I found helpful, but incomplete:

    (edit)Ubuntu 10.04/Apache 2.2

    I just went to enable 'Use Full Friendly URLs' and totally broke my site. Links were broken everywhere. First thing I realized was that I had no .htaccess file and renamed the htaccess.txt file in my xenForo directory to .htaccess. This didn't fix the problem, so I thought maybe I didn't even have mod_rewrite enabled. To check that I had to make a php.info file:
    #: cat > file1.php
    <?php phpinfo(); ?>
    [ctrl + C]
    Put that file in your webroot and access it with your browser, use [Ctrl + F] to search for "rewrite". If you don't find it, then it is not installed/enabled.

    In order to get that installed and working I used the command (as root):
    #: a2enmod rewrite
    #: /etc/init.d/apache2 restart
    That didn't seem to fix the issue, and that is because default Ubuntu/Apache installs do not have an AllowOverride directive in the configuration. I looked up how to do this right and ran across this article:

    That explains the disadvantages of using .htaccess files, with the main argument being that with AllowOverride directives you are telling the server to look for them in each request, and recursively up the file tree, adding lots of unnecessary overhead. Fortunately it explains an alternative that was easy to implement, by simply adding the exact same stuff you would to your .htaccess file to a <Directory> directive in your httpd.conf file instead. Open the .htaccess file that is supplied with xenForo (htaccess.txt if you haven't renamed it) and copy the contents to the clipboard. Now open your httpd.conf file (usually at /var/apache2/) and add these three lines:
    <Directory [path_to_your_xenForo_install_in_your_webroot]>
    In between those two tags, paste the contents of the clipboard (the .htaccess file).

    Restart your webserver again:
    #: /etc/init.d/apache2 restart
    And you should be good to go with Friendly URLS, using an even better way than .htaccess files =)
    MichaelDance and Jake Bunce like this.
  2. kortia

    kortia Member

    My forum has been up a few months and has 150 discussions and over 750 messages. Is it to late to do this? I would have this would be already done deal, not sure why they make it an option. Everyone wants there stuff to rank.
    Can I pay you to do this?
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yes you can still implement friendly URLs. Instructions are here:


    Basically you enable the option in the Admin CP and rename the htaccess.txt file to .htaccess
  4. kortia

    kortia Member

    ok got it :) ANother question, how do you redirect the old links? Do they have a plug in for that? I really appreciate all the help!
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  6. kortia

    kortia Member

    Sorry , I thought if you changed the page extensions then you would need to point them to the new ones. The forum is new and only has 500 people so far so not to important.
    Now I am having a issue finding the moderation Que page. We need to monitor all forums and I changed a few that have to be approved, but cant find it again to change the other nodes. I thought it was one box to check, but I am noticing some people jsut instantly post and some have to be approved after they post it.

    I am absolutely in love with the software :)
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You can enable moderation of posts per group or per forum:

    Admin CP -> Users -> List User Groups -> [click the group] -> Follow message moderation rules (Not Set = will be moderated)

    Admin CP -> Applications -> Display Node Tree -> [click the forum] -> Forum Options: Moderate all messages posted in this forum
  8. MichaelDance

    MichaelDance Well-Known Member

    I think they auto update.

Share This Page