Receptional Andy

msg:3613185 | 11:56 am on Mar 28, 2008 (gmt 0) |
Hi Galench, The problem is that your errordocument is a full URL which will always trigger a redirect in Apache. Use the below instead:
|
galench

msg:3613215 | 12:34 pm on Mar 28, 2008 (gmt 0) |
Well that`s works fine! But what the difference between ErrorDocument and RewriteRule?
|
Receptional Andy

msg:3613226 | 12:40 pm on Mar 28, 2008 (gmt 0) |
Your rewrite rule is just displaying the content of the 404 page, but it's not returning the correct (404) status code. That means broken links are essentially valid pages and will, for instance, get indexed by search engines. You could probably replicate this, including status code with a rewriterule, but I doubt you would ever need or want to since errordocuments are designed for this purpose.
|
galench

msg:3613306 | 1:57 pm on Mar 28, 2008 (gmt 0) |
Your rewrite rule is just displaying the content of the 404 page, but it's not returning the correct (404) status code. That means broken links are essentially valid pages and will, for instance, get indexed by search engines. |
| Understood! And it`s mean what RewriteRule does not give me any error log information! But if I will use ErrorDocument, all "not found pages" will be displayed in my Error log! Right? So, I also made:
ErrorDocument 400 / ErrorDocument 401 / ErrorDocument 403 / ErrorDocument 404 / ErrorDocument 500 /
|
Receptional Andy

msg:3613326 | 2:10 pm on Mar 28, 2008 (gmt 0) |
That's right. I would consider making custom pages a bit more relevant to the error you are returning, though: otherwise you risk visitors ending up at the homepage and not understanding that an error has occurred.
|
galench

msg:3613353 | 2:28 pm on Mar 28, 2008 (gmt 0) |
Yes! I understand it! I hope I haven`t many error pages! :) But, anyway, it`s necessary to check frequently Error log. Thanks for excellent replies!
|
|