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

.htaccess included with XF?

#1
Hi,


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

Code:
    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]
 
F

Floris

Guest
#2
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
 

Kier

XenForo Developer
Staff member
#3
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