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

Another n00b htaccess question..

Discussion in 'XenForo Questions and Support' started by 3c, Jan 30, 2012.

  1. 3c

    3c Active Member

    The more threads I read from searching htacces and index.php the less I can get what I'm looking for...or I just missed it or something.

    I already have an htaccess file for my main domain, however, I would like to have it where my forum wouldn't show the index.php..

    I just want it to be example.com/community

    I"m thinking that's just adding a line, but I'm not sure what to add..
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This enables that:

    DirectoryIndex index.php
    But what you really want is to use XF's default .htaccess file. It is named "htaccess.txt". Rename it to ".htaccess". That will enable friendly URLs which removes index.php.

    You must also enable this setting:

    Admin CP -> Home -> Options -> Search Engine Optimisation (SEO) -> Use Full Friendly URLs
    Sway likes this.
  3. 3c

    3c Active Member

    ok...does that still work with it being in a sub directory?? I already have one in the root that the main platform runs on...xf is in a sub directory called forums..I can just do another htaccess in that directory and still have the main in the root?
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yep, it will work in the subdirectory. It will override the one in the web root.
  5. 3c

    3c Active Member

    oh...hmm...not so sure I want to do that....my main site is a classifieds/auction site and it's setup good from the whole SEO/url standpoint...

    ok..let me make sure I understand this....the one I already have in the root has nothing in it about the forum (was just added)...so there shouldn't be anything to overide, per se, cause there is nothing it about the xf directory at all....

    now if I do the xf one in the forums directory it will only affect that directory down (forums/styles/etc) but won't do anything to the rest of the site (other directories)???

    is that correct??
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    3c likes this.
  7. 3c

    3c Active Member

    Cool! Told you it was a n00b question...LOL

    Thanks much Jake! I appreciate it!

Share This Page