0

I wanted to serve .xhtml files as

  • application/xhtml+xml if the browser says that it accepts it.
  • text/html otherwise

Then, I had this code:

<Files "*.xhtml">
    RewriteEngine on
    RewriteCond %{HTTP:Accept} !application/xhtml\+xml 
    RewriteRule .* - [T=text/html]
</Files>

And it worked well.

The problem is that, after disabling FollowSymLinks (I don't use symbolic links), instead of the .xhtml file I get 403 Forbidden error.

Why? Is RewriteRule .* - [T=text/html] a symbolic link?

Oriol
  • 274,082
  • 63
  • 437
  • 513
  • possible duplicate:http://stackoverflow.com/questions/3771175/apache-htaccess-to-redirect-index-html-to-root-why-followsymlinks-and-rewriteb – Babblo Feb 28 '13 at 17:58
  • @Babblo I think that the questions ask different things, but part of the answer is common. But thanks for the link – Oriol Feb 28 '13 at 18:05

0 Answers0