Forum Moderators: phranque
And as I said the site works fine almost every time, but sometimes that happen, and now I really don't know what to do.
<snip>
Thanks, Jaime
[edited by: jdMorgan at 10:13 pm (utc) on Oct. 22, 2007]
[edit reason] screenshot contains domain name, please see TOS. [/edit]
So the next question is, have you asked your host about this? It seems to be an Apache configuration or installation problem. Alternatively, if you are overwriting or generating some of the HTTP response codes in .htaccess or with a script, then you might want to look into that code to find the error.
If this is a server problem and you can't get help from the host, consider switching hosts.
Jim
Options -Indexes
ErrorDocument 403 http://www.example.com/error/?code=403
ErrorDocument 404 http://www.example.com/error/?code=404
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.example.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.com$ [NC]
RewriteRule .*\.(gif在mp存wf她sf妃p3)$ http://www.example.com/images/h/1.gif [L,R,NC]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
and I'm not modifying anything of the header in any of my .php, I already sent an e-mail to my hosting, and they say they will be monitoring my account to see what's happening
[edited by: jdMorgan at 2:23 am (utc) on Oct. 23, 2007]
[edit reason] No domain names, please. See Terms of Service. [/edit]
Unfortunately, none of this is going to affect your main problem.
Options -Indexes
ErrorDocument 403 /error/?code=403
ErrorDocument 404 /error/?code=404
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
#
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://www\.example\.com
RewriteCond %{REQUEST_URI} !^/images/h/1.gif
RewriteRule \.(gif在mp存wf她sf妃p3)$ http://www.example.com/images/h/1.gif [NC,R=302,L]
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule> Escape all literal periods in regex patterns with a preceding "\".
Do not end-anchor the domain name in RewriteCond patterns. Or if you feel you must end-anchor it, then make provisions for an optional trailing port number. Example pattern: ^www\.example\.com(:[0-9]+)?$
Using "." instead of "!^$" is equivalent, but shorter and faster.
By leaving the end-anchor off the domain name in the second RewriteCond pattern of the second rule, you can cover all possible variations of trailing path info using only that one RewriteCond.
Adding a RewriteCond to prevent redirection of /images/h/1.gif will prevent an 'infinite' redirection loop.
A pattern of "\.gif$" is entirely equivalent to a pattern of ".*\.gif$" if neither are start-anchored using "^".
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim