Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I found these somewhere at the end of my htaccess file, from a time in history where I was in a mood of just adding as much as i could to my htaccess, now wishing the opposite: to remove everything thats unneeded from it, to make my site faster.

Q1 Whats the function of these?
Q2 Will my site become faster if i would delete these?

Options All
Options +FollowSymLinks
RewriteBase /

BrowserMatch "MSIE" brokenvary=1
BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
BrowserMatch "Opera" !brokenvary
SetEnvIf brokenvary 1 force-no-vary[/i]
share|improve this question

1 Answer 1

up vote 3 down vote accepted
Options All
Options +FollowSymLinks

The Options tag specifies which features are available in a directory. In this case, it allows everything, but in case that doesn't do it, it's extra permitting following symlinks.

RewriteBase /

The RewriteBase tag is part of mod_rewrite and sets the root of later rewrite rules. This is completely superfluous.

BrowserMatch "MSIE" brokenvary=1
BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
BrowserMatch "Opera" !brokenvary

BrowserMatch is used to change behavior based on the user-agent string. It sets environmental variables that Apache uses. In this case it's working around some (old) broken HTTP/1.1 problems that IE and browsers that send an agent string with "Mozilla/4.xy" had. The last line tells the webserver that Opera behaves as expected, and to unset the environmental variable if it is present.

share|improve this answer
    
Thanks very muuch Sysadmin 1138, clear explanation. But should I keep it, or delete this stuff in my htaccess? i heard namely, the more stuf fyou keep, the heavier / slower the server will respond... which rules might speed up when deleted / added? –  Sam Dec 15 '10 at 0:18
    
The Options one are the only ones I'd even consider keeping. The rest can be thrown over the side. Check your httpd.conf file to see if your locations have their options set there, so you don't have to do it in .htaccess –  sysadmin1138 Dec 15 '10 at 0:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.