kambiz619 5 ارسال شده در بهمن 94 گزارش بازنشر ارسال شده در بهمن 94 (ویرایش شده) سلام دوستان همونطور که اطلاع دارید این فایل قابلیت های زیادری رو داره من امروز این فایل رو چک میکردم متوجه نشدم این کدها دقیقا مربوط به چی هست و ازونجایی که سایت من با مشکلات متعددی برخورد میکنم قصد دارم این فایل رو مورد بررسی قرار بدیم تا به یه فایل استاندارد برای سایتم برسم این کد فایل htaccess سای من هست # BEGIN All In One WP Security #AIOWPS_BLOCK_WP_FILE_ACCESS_START <Files license.txt> order allow,deny deny from all </files> <Files wp-config-sample.php> order allow,deny deny from all </Files> <Files readme.html> order allow,deny deny from all </Files> #AIOWPS_BLOCK_WP_FILE_ACCESS_END #AIOWPS_BASIC_HTACCESS_RULES_START <Files .htaccess> order allow,deny deny from all </Files> ServerSignature Off LimitRequestBody 10240000 <Files wp-config.php> order allow,deny deny from all </Files> #AIOWPS_BASIC_HTACCESS_RULES_END #AIOWPS_BLOCK_SPAMBOTS_START <IfModule mod_rewrite.c> RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_URI} ^(.*)?wp-comments-post\.php(.*)$ RewriteCond %{HTTP_REFERER} !^http(s)?://nakaman\.ir [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule .* http://127.0.0.1 [L] </IfModule> #AIOWPS_BLOCK_SPAMBOTS_END # END All In One WP Security # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress ErrorDocument 401 “Denied” ErrorDocument 403 “Denied” # Allow plugin access to admin-ajax.php around password protection <Files admin-ajax.php> Order allow,deny Allow from all Satisfy any </Files> <Files 403.shtml> order allow,deny allow from all </Files> deny from 217.147.90.75 ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 week" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 year" ExpiresByType application/javascript "access plus 1 year" ExpiresByType application/x-javascript "access plus 1 year" ExpiresByType text/html "access plus 5 seconds" ExpiresByType application/xhtml+xml "access plus 5 seconds" ExpiresByType font/ttf "access plus 1 year" ExpiresByType font/woff "access plus 1 year" </IfModule> ## EXPIRES CACHING ## <IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and fonts AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml # Remove browser bugs (only needed for really old browsers) BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html Header append Vary User-Agent </IfModule> دو کد آخر مربوط به کش مرورگر هست که اونا رو هم از وقتی اضاف کردم وقتی مخاطب وارد سایت میشد تا ctrl + F5 نمیزد مطالب جدید من رو نمیتونست ببینه ! تا اینکه این قسمت پایین مدت زمانش رو تغییر دادم ( از 1 سال به 5 ثانیه ! ) ExpiresByType text/html "access plus 5 seconds" ExpiresByType application/xhtml+xml "access plus 5 seconds" حالا از دوستان مجرب در زمینه وردپرس میخوام این کد مورد تحلیل قرار بدن # BEGIN All In One WP Security #AIOWPS_BLOCK_WP_FILE_ACCESS_START <Files license.txt> order allow,deny deny from all </files> <Files wp-config-sample.php> order allow,deny deny from all </Files> <Files readme.html> order allow,deny deny from all </Files> #AIOWPS_BLOCK_WP_FILE_ACCESS_END #AIOWPS_BASIC_HTACCESS_RULES_START <Files .htaccess> order allow,deny deny from all </Files> ServerSignature Off LimitRequestBody 10240000 <Files wp-config.php> order allow,deny deny from all </Files> #AIOWPS_BASIC_HTACCESS_RULES_END #AIOWPS_BLOCK_SPAMBOTS_START <IfModule mod_rewrite.c> RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_URI} ^(.*)?wp-comments-post\.php(.*)$ RewriteCond %{HTTP_REFERER} !^http(s)?://nakaman\.ir [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule .* http://127.0.0.1 [L] </IfModule> #AIOWPS_BLOCK_SPAMBOTS_END # END All In One WP Security # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress ErrorDocument 401 “Denied” ErrorDocument 403 “Denied” # Allow plugin access to admin-ajax.php around password protection <Files admin-ajax.php> Order allow,deny Allow from all Satisfy any </Files> <Files 403.shtml> order allow,deny allow from all </Files> deny from 217.147.90.75 ویرایش شده بهمن 94 توسط kambiz619 نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .