2

I'm trying to implement xSendFile in my Apache server. However, i found there is a conflict with the RewriteEngine and xsendfile.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^abc\.com$ [NC]
RewriteRule ^(.*)$ http://www.abc.com/$1 [R=301,L]

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 

# otherwise forward it to index.php
RewriteRule . index.php

Right now, everytime I use xsendfile, it gives me:

The requested URL /index.php was not found on this server.

Any ideas?

jackhao
  • 3,457
  • 3
  • 22
  • 43

0 Answers0