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

.htaccess included with XF?

Discussion in 'XenForo Questions and Support' started by kuyenmotdivad, Oct 26, 2010.

  1. kuyenmotdivad

    kuyenmotdivad Active Member


    Could one of the developers please explain what these lines do in the .htaccess file?

        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]
    arty777 likes this.
  2. Floris

    Floris Guest

    Whenever anything is matching the condition, rewrite it - except a few dirs

    It makes index.php?this/that to be just /that/<id> url pretty
    kuyenmotdivad likes this.
  3. Kier

    Kier XenForo Developer Staff Member

    Essentially, the rules say:

    If the request is something that is
    - not a known file OR
    - not a known link OR
    - not a known directory
    Then take the whole request from start to finish
    Unless it's for something in the data, js, styles or install directories
    And pass it to index.php
    kuyenmotdivad likes this.
  4. kuyenmotdivad

    kuyenmotdivad Active Member

    Thanks guys that cleared it up for me - a lot. :)

Share This Page