I am getting below error in server log, when re-writing the URLs.

[Fri Jan 25 11:32:57 2013] [error] [client ***IP***] File does not exist: /home/testserver/public_html/testing/flats-in-delhi-for-sale, referer: http://domain.in/testing/flats-in-delhi-for-sale/

I searched very where, but not found any solution.

My .htaccess config is given below:

Options +FollowSymLinks
Options All -Indexes

ErrorDocument 404 http://domain.in/testing/404.php

RewriteEngine On

#Category Link
RewriteRule ^([a-zA-Z]+)-in-([a-zA-Z]+)-([a-zA-Z-]+)/?$ view-category.php?type=$1&dis=$2&cat=$3 [NC,L]

#Single Property Link
RewriteRule ^([a-zA-Z]+)-in-([a-zA-Z]+)-([a-zA-Z-]+)/([a-zA-Z0-9-]+)/?$ view-property.php?type=$1&district=$2&category=$3&title_alias=$4 [NC,L]

I also found similar old dated question, but no answer ("File does not exist" in apache error log).

Thanks in advance for your help.

P.S.: My site is working fine even Apache log is showing the error.

3 Answers 3


I ran into a similar situation yesterday. My website was working fin, but there were errors in Apache's error log. The problem was caused by a mistake in my PHP files, not in my RewriteRule.

My PHP files contained the following fragment:

<script src="javascript/package-min-1367246122.js"></script>

The missing slash caused "file does not exist" errors in Apache's error log. This the correct fragment:

<script src="/javascript/package-min-1367246122.js"></script>

You may have used a , in some <img> tag. For example:

<img src="/testing/flats-in-delhi-for-sale,">
<script src="/testing/flats-in-delhi-for-sale,"></script>

Don't forget that the URL is very sensitive to any character.


I advise you to check the paths in your configuration .htacess file. If the error (file doesn't exist is shown), then the script can't find the file mentioned above.

  • 1
    Thanks for your reply. My site is working fine even Apache log is showing the error.
    – Nithin
    Commented Jan 25, 2013 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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