I have an Apache web server with default settings, I didn't add any rewrite rules to it.
When I request a file through my application, if the file doesn't exist then Apache returns another file with a close name to the original name. The GET return is 301. I don't want this behavior but I am not sure how to disable it.
I attempted several solutions I found online, but none seem to work. Here are my attempts:
- I added a .htaccess file with a
RewriteEngine Off
- I added a .htaccess file with a
RewriteEngine On
but without any other lines or rules for the rewrite. One person online suggested that this is similar to turning it off. - I added a
<Directory>
directive in httpd.conf, with only one line in it:RewriteEngine Off
. I attempted the Directory two times, one time with a full path, and another time with a path starting after the domain name. For example, the link iswww.domain.com/some/path/file.flv
. My first attempt was<Directory "/root/to/some/path/">
and the second attempt was<Directory "/some/path/">
.
None of these attempts have worked and I am not sure how to resolve this issue.
UPDATE 1:
My application is a Flex Application created with the Flex SDK. I have Adobe Media Server installed on my server. My application loads a video file by setting the source property of the VideoDisplay object to (for example):
"/some/path/123_video.flv"
.
Now if that file doesn't exist, and I have a file called: "124_video.flv"
then this other file will be played instead and my /var/log/httpd/access_log
will have a line with GET 301
return value.
I am sure that I send the correct file name from my application. The access_log
even shows my file's name (123_video.flv
in this example) but with a 301
return code and then my application plays the other video (124_video.flv
).
As a test, I disabled the mod_rewrite.so
module in my httpd.conf
(by commenting the line with #
) and I started getting 500
as a return code for files that didn't exist.
What is more strange, I just did a quick test again, I went through my httpd.conf and changed all AllowOverride All
to AllowOverride None
restarted the httpd server and I still got the 301
code!!
I even commented the mod_rewrite.so
again and restarted the server.. and I got the same result 301
!!
I think my last test has something else wrong in it, but not sure what.