-
June 29th, 2012, 10:33
#1
چرا گاهی اوقات ارور 403 نمایش داده می شه؟
یه مدته که این ارور نمایش داده می شه و بعضی از فایلها لود نمی شن. بنظرتون مشکل چیه؟
کد HTML:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /tese
on this server.</p>
<p>Additionally, a 403 Forbidden
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 Server at localhost7 Port 80</address>
</body></html>
-
-
June 29th, 2012 10:33
# ADS
-
June 29th, 2012, 11:27
#2
عضو دائم
پاسخ : چرا گاهی اوقات ارور 403 نمایش داده می شه؟
ارور دسترسی هست
دسترسی یا همان پرمیشن فایلها یا فولدری که آن فایلها داخلش هستند درست هست ؟
پرووایدر خدمات دیتاسنتری در تهران
از سال 1385 تا کنون
-
تعداد تشکر ها از RoobinaServer به دلیل پست مفید
-
June 29th, 2012, 12:24
#3
پاسخ : چرا گاهی اوقات ارور 403 نمایش داده می شه؟
دسترسی به همه فایلها وجود داره ولی مشکل از htaccess هست.
این بخش از ارور رو نگا کنید:
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
-
-
June 29th, 2012, 20:39
#4
پاسخ : چرا گاهی اوقات ارور 403 نمایش داده می شه؟
-
-
August 21st, 2012, 09:47
#5
پاسخ : چرا گاهی اوقات ارور 403 نمایش داده می شه؟
مشکل از فایل هیدن htaccess هست که کدی در آن وارد شده که سطح دسترسی برای یک سری فرمتها رو بسته
که احتمالا همون فرمت فایل دلخواه شما بوده
-
-
September 6th, 2012, 13:12
#6
پاسخ : چرا گاهی اوقات ارور 403 نمایش داده می شه؟
قسمتهایی از فایل HTACCESS که فکر می کنم باعث مشکل شدن در ادامه قرار دادم. بنظرتون مشکل چیه:
کد PHP:
ErrorDocument 404 /page/p404
ErrorDocument 403 /page/p403
ErrorDocument 500 /page/p500
RewriteEngine On
Options +FollowSymLinks
RewriteBase /
RewriteRule ^folder3/.*$ - [L]
RewriteRule ^folder4/.*$ - [L]
RewriteRule ^sitemap.xml$ folder1/sitemap.php [NC,L]
RewriteRule ^robots.txt$ folder2/robots.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
محتویات کامل فایل HTACCESS رو در ادامه نوشتم
کد PHP:
#To privent from file listing in pages that dont have index file
IndexIgnore *
#To add charset
AddDefaultCharset utf-8
<limit put>
order deny,allow
deny from all
</limit>
#privent from FSOCKOPEN
# protect wpconfig.php
<files wp-config.php>
order allow,deny
deny from all
</files>
# disable directory browsing
Options All -Indexes
# STRONG HTACCESS PROTECTION</code>
<Files ~ "^.*\.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</Files>
#<Files .htaccess>
#order allow,deny
#deny from all
#</Files>
##############################
# BEGIN Compress text files
<ifModule mod_deflate.c>
<filesMatch "\.(css|js|php|x?html?)$">
SetOutputFilter DEFLATE
</filesMatch>
</ifModule>
# END Compress text files
# BEGIN Expire headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
#ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
# END Expire headers
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|bmp|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, private"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "max-age=2592000, private"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "max-age=2592000, private"
</filesMatch>
<filesMatch "\.(x?html?)$">
Header set Cache-Control "max-age=600, private, must-revalidate"
</filesMatch>
</ifModule>
# END Cache-Control Headers
# BEGIN Turn ETags Off
<ifModule mod_headers.c>
Header unset ETag
</ifModule>
FileETag None
# END Turn ETags Off
# BEGIN Remove Last-Modified Header
<ifModule mod_headers.c>
Header unset Last-Modified
</ifModule>
# END Remove Last-Modified Header
##############################
#AddType application/x-httpd-php .asp .py .pl
#page not found
ErrorDocument 404 /page/p404
#Access forbidden:
ErrorDocument 403 /page/p403
#Server error
ErrorDocument 500 /page/p500
RewriteEngine On
Options +FollowSymLinks
RewriteBase /
# yes-www
#RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
#RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteRule ^folder3/.*$ - [L]
RewriteRule ^folder4/.*$ - [L]
RewriteRule ^sitemap.xml$ folder1/sitemap.php [NC,L]
RewriteRule ^robots.txt$ folder1/robots.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
#to privent from <script> tags
#RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
#RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
#RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
#RewriteRule ^(.*)$ index.php [F,L]
#################################################
#To privent from load your pics in other wweb sites
#RewriteCond %{HTTP_REFERER} !^$
#RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
#RewriteRule \.(gif|jpg|jpeg|png|bmp|swf|flv)$ - [F]
#To show your pic in the sites which load your sites
#RewriteCond %{HTTP_REFERER} !^$
#RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
#RewriteRule \.(gif|jpg|jpeg|png|bmp|swf|flv)$ http://www.mydomain.com/badimage.gif [R,L]
#################################################
ویرایش توسط host-host : September 6th, 2012 در ساعت 13:21
-
-
September 6th, 2012, 13:13
#7
پاسخ : چرا گاهی اوقات ارور 403 نمایش داده می شه؟
لطفا راهنمایی کنید، کدها توی پست قبل خیلی کوچیک شدن و به همین دلیل ای پست رو ایجاد کردم که کدها واضح نماش داده بشن.
-