صفحه 1 از 2 12 آخرینآخرین
نمایش نتایج: از شماره 1 تا 10 , از مجموع 14

موضوع: بهترین تنظیماتhtaccess - robots.txt

  1. #1
    کاربر اخراج شده
    تاریخ عضویت
    Aug 2012
    محل سکونت
    تبریز
    نوشته ها
    126
    تشکر تشکر کرده 
    852
    تشکر تشکر شده 
    190
    تشکر شده در
    135 پست

    115 بهترین تنظیماتhtaccess - robots.txt

    با سلام دوستان
    بهترین تنظیمات برای لود و کارایی سایت منو راهنمایی کنید

    از سیستم های وردپرس و غیره استفاده نمیکنم

    بهترین تنظیمات برای لود بیشتر و کش بالا و غیره برای .htaccess

    بهترین تنظیمات برای روبات robots.txt


    بهترین روش برای gzip کردن و غیره

  2. # ADS




     

  3. #2
    عضو انجمن h4k3r آواتار ها
    تاریخ عضویت
    May 2011
    نوشته ها
    108
    تشکر تشکر کرده 
    0
    تشکر تشکر شده 
    83
    تشکر شده در
    45 پست

    پیش فرض پاسخ : بهترین تنظیماتhtaccess - robots.txt

    برای کدوم cms ?

    یک نمونه کد برای htaccess گذاشتم

    هیت اکسس - kPaste - انتشار آسان پیست
    javadthهستم
    کد تخفیف نت افراز : 12 درصدی : usr326XAZ و usr762EZQ , usr280WRO

  4. تعداد تشکر ها از h4k3r به دلیل پست مفید


  5. #3
    عضو جدید akramieh آواتار ها
    تاریخ عضویت
    Nov 2012
    محل سکونت
    tehran
    نوشته ها
    77
    تشکر تشکر کرده 
    24
    تشکر تشکر شده 
    250
    تشکر شده در
    176 پست

    پیش فرض پاسخ : بهترین تنظیماتhtaccess - robots.txt

    البته فکر کنم زیاد فرقی برای cms ها فرق نداره این تنظیمات و وجودش یک لازمه مهم هست.


    Section 1: Main Settings and Options # # Options: ALL,ExecCGI,FollowSymLinks,Includes,IncludesNOEXEC ,Indexes # MultiViews, SymLinksIfOwnerMatch. # # Main Defaults. # Options +ExecCGI -Indexes DirectoryIndex index.html index.htm index.php DefaultLanguage en-US AddDefaultCharset UTF-8 ServerSignature Off ### ENVIRONMENT VARIABLES ### #SetEnv PHPRC /webroot/includes #SetEnv TZ America/Indianapolis #SetEnv SERVER_ADMIN webmaster@domain.tld ### MIME TYPES ### AddType video/x-flv .flv AddType application/x-shockwave-flash .swf AddType image/x-icon .ico ### FORCE FILE TO DOWNLOAD INSTEAD OF APPEAR IN BROWSER ### #-> THE Ultimate Htaccess #AddType application/octet-stream .mov .mp3 .zip ### ERRORDOCUMENTS ### ErrorDocument 404 "404 error" ErrorDocument 400 "400 error" ErrorDocument 401 "401 error" ErrorDocument 403 "403 error" ErrorDocument 405 "405 error" ErrorDocument 406 "406 error" ErrorDocument 409 "409 error" ErrorDocument 413 "413 error" ErrorDocument 414 "414 error" ErrorDocument 500 "500 error" ErrorDocument 501 "501 error" #================================================= ============================# # SCRIPTING, ACTION, ADDHANDLER #================================================= ============================# # Handlers be builtin, included in a module, or added with Action directive # default-handler: default, handles static content (core) # send-as-is: Send file with HTTP headers (mod_asis) # cgi-script: treat file as CGI script (mod_cgi) # imap-file: Parse as an imagemap rule file (mod_imap) # server-info: Get server config info (mod_info) # server-status: Get server status report (mod_status) # type-map: type map file for content negotiation (mod_negotiation) # fastcgi-script: treat file as fastcgi script (mod_fastcgi) ########### ### PARSE AS CGI ### #AddHandler cgi-script .cgi .pl .spl ### RUN PHP AS APACHE MODULE ### #AddHandler application/x-httpd-php .php .htm ### RUN PHP AS CGI ### #AddHandler php-cgi .php .htm ### CGI PHP WRAPPER FOR CUSTOM PHP.INI ### #AddHandler phpini-cgi .php .htm #Action phpini-cgi /cgi-bin/php5-custom-ini.cgi ### FAST-CGI SETUP WITH PHP-CGI WRAPPER FOR CUSTOM PHP.INI ### #AddHandler fastcgi-script .fcgi #AddHandler php-cgi .php .htm #Action php-cgi /cgi-bin/php5-wrapper.fcgi ### CUSTOM PHP CGI BINARY SETUP ### #AddHandler php-cgi .php .htm #Action php-cgi /cgi-bin/php.cgi ### PROCESS SPECIFIC FILETYPES WITH CGI-SCRIPT ### #Action image/gif /cgi-bin/img-create.cgi ### CREATE CUSTOM HANDLER FOR SPECIFIC FILE EXTENSIONS ### #AddHandler custom-processor .ssp #Action custom-processor /cgi-bin/myprocessor.cgi #================================================= ============================# # HEADERS, CACHING AND OPTIMIZATION #================================================= ============================# #-> THE Ultimate Htaccess # 300 5 M # 2700 45 M # 3600 1 H # 54000 15 H # 86400 1 D # 518400 6 D # 604800 1 W # 1814400 3 W # 2419200 1 M # 26611200 11 M # 29030400 1 Y (never expire) ########### #### HEADER CACHING #### #-> THE Ultimate Htaccess #<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico)$"> # Header set Cache-Control "max-age=2592000" #</FilesMatch> #<FilesMatch "\.(js|css|pdf|swf)$"> # Header set Cache-Control "max-age=604800" #</FilesMatch> #<FilesMatch "\.(html|htm|txt)$"> # Header set Cache-Control "max-age=600" #</FilesMatch> #<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> # Header unset Cache-Control #</FilesMatch> ### ALTERNATE EXPIRES CACHING ### #-> htaccesselite.com/d/use-htaccess-to-speed-up-your-site-discussion-vt67.html #ExpiresActive On #ExpiresDefault A604800 #ExpiresByType image/x-icon A2592000 #ExpiresByType application/x-javascript A2592000 #ExpiresByType text/css A2592000 #ExpiresByType text/html A300 #<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> # ExpiresActive Off #</FilesMatch> ### META HTTP-EQUIV REPLACEMENTS ### #<FilesMatch "\.(html|htm|php)$"> # Header set imagetoolbar "no" #</FilesMatch> #================================================= ============================# # REWRITES AND REDIRECTS #================================================= ============================# # REQUEST METHODS: GET,POST,PUT,DELETE,CONNECT,OPTIONS,PATCH,PROPFIND , # PROPPATCH,MKCOL,COPY,MOVE,LOCK,UNLOCK ########### ### REWRITE DEFAULTS ### #RewriteEngine On #RewriteBase / ### REQUIRE SUBDOMAIN ### #RewriteCond %{HTTP_HOST} !^$ #RewriteCond %{HTTP_HOST} !^subdomain\.domain\.tld$ [NC] #RewriteRule ^/(.*)$ http://subdomain.domain.tld/$1 [L,R=301] ### SEO REWRITES ### #RewriteRule ^(.*)/ve/(.*)$ $1/voluntary-employee/$2 [L,R=301] #RewriteRule ^(.*)/hsa/(.*)$ $1/health-saving-account/$2 [L,R=301] ### WORDPRESS ### #RewriteCond %{REQUEST_FILENAME} !-f # Existing File #RewriteCond %{REQUEST_FILENAME} !-d # Existing Directory #RewriteRule . /index.php [L] ### ALTERNATIVE ANTI-HOTLINKING ### #RewriteCond %{HTTP_REFERER} !^$ #RewriteCond %{HTTP_REFERER} !^http://(subdomain\.)?domain.tld/.*$ [NC] #RewriteRule ^.*\.(bmp|tif|gif|jpg|jpeg|jpe|png)$ - [F] ### REDIRECT HOTLINKERS ### #RewriteCond %{HTTP_REFERER} !^$ #RewriteCond %{HTTP_REFERER} !^http://(subdomain\.)?domain.tld/.*$ [NC] #RewriteRule ^.*\.(bmp|tif|gif|jpg|jpeg|jpe|png)$ Google [R] ### DENY REQUEST BASED ON REQUEST METHOD ### #RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD)$ [NC] #RewriteRule ^.*$ - [F] ### REDIRECT UPLOADS ### #RewriteCond %{REQUEST_METHOD} ^(PUT|POST)$ [NC] #RewriteRule ^(.*)$ /cgi-bin/form-upload-processor.cgi?p=$1 [L,QSA] ### REQUIRE SSL EVEN WHEN MOD_SSL IS NOT LOADED ### #RewriteCond %{HTTPS} !=on [NC] #RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] #### ALTERNATATIVE TO USING ERRORDOCUMENT ### #-> THE Ultimate Htaccess #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule ^.*$ /error.php [L] ### SEO REDIRECTS ### #Redirect 301 /2006/oldfile.html http://subdomain.domain.tld/newfile.html #RedirectMatch 301 /o/(.*)$ http://subdomain.domain.tld/s/dl/$1 #================================================= ============================# # AUTHENTICATION AND SECURITY #================================================= ============================# # THE Ultimate Htaccess # # Require (user|group|valid-user) (username|groupname) ########### ### BASIC PASSWORD PROTECTION ### #AuthType basic #AuthName "prompt" #AuthUserFile /.htpasswd #AuthGroupFile /dev/null #Require valid-user ### ALLOW FROM IP OR VALID PASSWORD ### #Require valid-user #Allow from 192.168.1.23 #Satisfy Any ### PROTECT FILES ### #<FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh) $"> # Order Allow,Deny # Deny from all #</FilesMatch> ### PREVENT HOTLINKING ### #SetEnvIfNoCase Referer "^http://subdomain.domain.tld/" good #SetEnvIfNoCase Referer "^$" good #<FilesMatch "\.(png|jpg|jpeg|gif|bmp|swf|flv)$"> # Order Deny,Allow # Deny from all # Allow from env=good # ErrorDocument 403 http://www.google.com/intl/en_ALL/images/logo.gif # ErrorDocument 403 /images/you_bad_hotlinker.gif #</FilesMatch> ### LIMIT UPLOAD FILE SIZE TO PROTECT AGAINST DOS ATTACK ### #LimitRequestBody 10240000 #bytes, 0-2147483647(2GB) #================================================= ============================# # SSL SECURITY #================================================= ============================# #-> THE Ultimate Htaccess ########### ### MOST SECURE WAY TO REQUIRE SSL ### #-> THE Ultimate Htaccess #SSLOptions +StrictRequire #SSLRequireSSL #SSLRequire %{HTTP_HOST} eq "domain.tld" #ErrorDocument 403 https://domain.tld #================================================= ============================# # SITE UNDER CONSTRUCTION #================================================= ============================# # Heres some awesome htaccess to use when you are developing a site ########### ### COMBINED DEVELOPER HTACCESS CODE-USE THIS ### #<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|js|css|pdf|swf|html|h tm|txt)$"> # Header set Cache-Control "max-age=5" #</FilesMatch> #AuthType basic #AuthName "Ooops! Temporarily Under Construction..." #AuthUserFile /.htpasswd #AuthGroupFile /dev/null #Require valid-user # password prompt for everyone else #Order Deny,Allow #Deny from all #Allow from 192.168.64.5 # Your, the developers IP address #Allow from w3.org # css/xhtml check jigsaw.w3.org/css-validator/ #Allow from googlebot.com # Allows google to crawl your pages #Satisfy Any # no password required if host/ip is Allowed ### DONT HAVE TO EMPTY CACHE OR RELOAD TO SEE CHANGES ### #ExpiresDefault A5 #If using mod_expires #<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|js|css|pdf|swf|html|h tm|txt)$"> # Header set Cache-Control "max-age=5" #</FilesMatch> ### ALLOW ACCESS WITH PASSWORD OR NO PASSWORD FOR SPECIFIC IP/HOSTS ### #AuthType basic #AuthName "Ooops! Temporarily Under Construction..." #AuthUserFile /.htpasswd #AuthGroupFile /dev/null #Require valid-user # password prompt for everyone else #Order Deny,Allow #Deny from all #Allow from 192.168.64.5 # Your, the developers IP address #Allow from w3.org # css/xhtml check jigsaw.w3.org/css-validator/ #Allow from googlebot.com # Allows google to crawl your pages #Satisfy Any # no password required if host/ip is Allowed
    هلدینگ وب ایده ارائه دهنده خدمات پیام کوتاه، گیتوی پیامکی، هاستینگ و دامنه

    پنل و سامانه پیامکی | ایده گیت | صداقت نیوز

  6. #4
    کاربر اخراج شده
    تاریخ عضویت
    Aug 2012
    محل سکونت
    تبریز
    نوشته ها
    126
    تشکر تشکر کرده 
    852
    تشکر تشکر شده 
    190
    تشکر شده در
    135 پست

    پیش فرض پاسخ : بهترین تنظیماتhtaccess - robots.txt

    نقل قول نوشته اصلی توسط akramieh نمایش پست ها
    البته فکر کنم زیاد فرقی برای cms ها فرق نداره این تنظیمات و وجودش یک لازمه مهم هست.


    Section 1: Main Settings and Options # # Options: ALL,ExecCGI,FollowSymLinks,Includes,IncludesNOEXEC ,Indexes # MultiViews, SymLinksIfOwnerMatch. # # Main Defaults. # Options +ExecCGI -Indexes DirectoryIndex index.html index.htm index.php DefaultLanguage en-US AddDefaultCharset UTF-8 ServerSignature Off ### ENVIRONMENT VARIABLES ### #SetEnv PHPRC /webroot/includes #SetEnv TZ America/Indianapolis #SetEnv SERVER_ADMIN webmaster@domain.tld ### MIME TYPES ### AddType video/x-flv .flv AddType application/x-shockwave-flash .swf AddType image/x-icon .ico ### FORCE FILE TO DOWNLOAD INSTEAD OF APPEAR IN BROWSER ### #-> THE Ultimate Htaccess #AddType application/octet-stream .mov .mp3 .zip ### ERRORDOCUMENTS ### ErrorDocument 404 "404 error" ErrorDocument 400 "400 error" ErrorDocument 401 "401 error" ErrorDocument 403 "403 error" ErrorDocument 405 "405 error" ErrorDocument 406 "406 error" ErrorDocument 409 "409 error" ErrorDocument 413 "413 error" ErrorDocument 414 "414 error" ErrorDocument 500 "500 error" ErrorDocument 501 "501 error" #================================================= ============================# # SCRIPTING, ACTION, ADDHANDLER #================================================= ============================# # Handlers be builtin, included in a module, or added with Action directive # default-handler: default, handles static content (core) # send-as-is: Send file with HTTP headers (mod_asis) # cgi-script: treat file as CGI script (mod_cgi) # imap-file: Parse as an imagemap rule file (mod_imap) # server-info: Get server config info (mod_info) # server-status: Get server status report (mod_status) # type-map: type map file for content negotiation (mod_negotiation) # fastcgi-script: treat file as fastcgi script (mod_fastcgi) ########### ### PARSE AS CGI ### #AddHandler cgi-script .cgi .pl .spl ### RUN PHP AS APACHE MODULE ### #AddHandler application/x-httpd-php .php .htm ### RUN PHP AS CGI ### #AddHandler php-cgi .php .htm ### CGI PHP WRAPPER FOR CUSTOM PHP.INI ### #AddHandler phpini-cgi .php .htm #Action phpini-cgi /cgi-bin/php5-custom-ini.cgi ### FAST-CGI SETUP WITH PHP-CGI WRAPPER FOR CUSTOM PHP.INI ### #AddHandler fastcgi-script .fcgi #AddHandler php-cgi .php .htm #Action php-cgi /cgi-bin/php5-wrapper.fcgi ### CUSTOM PHP CGI BINARY SETUP ### #AddHandler php-cgi .php .htm #Action php-cgi /cgi-bin/php.cgi ### PROCESS SPECIFIC FILETYPES WITH CGI-SCRIPT ### #Action image/gif /cgi-bin/img-create.cgi ### CREATE CUSTOM HANDLER FOR SPECIFIC FILE EXTENSIONS ### #AddHandler custom-processor .ssp #Action custom-processor /cgi-bin/myprocessor.cgi #================================================= ============================# # HEADERS, CACHING AND OPTIMIZATION #================================================= ============================# #-> THE Ultimate Htaccess # 300 5 M # 2700 45 M # 3600 1 H # 54000 15 H # 86400 1 D # 518400 6 D # 604800 1 W # 1814400 3 W # 2419200 1 M # 26611200 11 M # 29030400 1 Y (never expire) ########### #### HEADER CACHING #### #-> THE Ultimate Htaccess #<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico)$"> # Header set Cache-Control "max-age=2592000" #</FilesMatch> #<FilesMatch "\.(js|css|pdf|swf)$"> # Header set Cache-Control "max-age=604800" #</FilesMatch> #<FilesMatch "\.(html|htm|txt)$"> # Header set Cache-Control "max-age=600" #</FilesMatch> #<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> # Header unset Cache-Control #</FilesMatch> ### ALTERNATE EXPIRES CACHING ### #-> htaccesselite.com/d/use-htaccess-to-speed-up-your-site-discussion-vt67.html #ExpiresActive On #ExpiresDefault A604800 #ExpiresByType image/x-icon A2592000 #ExpiresByType application/x-javascript A2592000 #ExpiresByType text/css A2592000 #ExpiresByType text/html A300 #<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> # ExpiresActive Off #</FilesMatch> ### META HTTP-EQUIV REPLACEMENTS ### #<FilesMatch "\.(html|htm|php)$"> # Header set imagetoolbar "no" #</FilesMatch> #================================================= ============================# # REWRITES AND REDIRECTS #================================================= ============================# # REQUEST METHODS: GET,POST,PUT,DELETE,CONNECT,OPTIONS,PATCH,PROPFIND , # PROPPATCH,MKCOL,COPY,MOVE,LOCK,UNLOCK ########### ### REWRITE DEFAULTS ### #RewriteEngine On #RewriteBase / ### REQUIRE SUBDOMAIN ### #RewriteCond %{HTTP_HOST} !^$ #RewriteCond %{HTTP_HOST} !^subdomain\.domain\.tld$ [NC] #RewriteRule ^/(.*)$ http://subdomain.domain.tld/$1 [L,R=301] ### SEO REWRITES ### #RewriteRule ^(.*)/ve/(.*)$ $1/voluntary-employee/$2 [L,R=301] #RewriteRule ^(.*)/hsa/(.*)$ $1/health-saving-account/$2 [L,R=301] ### WORDPRESS ### #RewriteCond %{REQUEST_FILENAME} !-f # Existing File #RewriteCond %{REQUEST_FILENAME} !-d # Existing Directory #RewriteRule . /index.php [L] ### ALTERNATIVE ANTI-HOTLINKING ### #RewriteCond %{HTTP_REFERER} !^$ #RewriteCond %{HTTP_REFERER} !^http://(subdomain\.)?domain.tld/.*$ [NC] #RewriteRule ^.*\.(bmp|tif|gif|jpg|jpeg|jpe|png)$ - [F] ### REDIRECT HOTLINKERS ### #RewriteCond %{HTTP_REFERER} !^$ #RewriteCond %{HTTP_REFERER} !^http://(subdomain\.)?domain.tld/.*$ [NC] #RewriteRule ^.*\.(bmp|tif|gif|jpg|jpeg|jpe|png)$ Google [R] ### DENY REQUEST BASED ON REQUEST METHOD ### #RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD)$ [NC] #RewriteRule ^.*$ - [F] ### REDIRECT UPLOADS ### #RewriteCond %{REQUEST_METHOD} ^(PUT|POST)$ [NC] #RewriteRule ^(.*)$ /cgi-bin/form-upload-processor.cgi?p=$1 [L,QSA] ### REQUIRE SSL EVEN WHEN MOD_SSL IS NOT LOADED ### #RewriteCond %{HTTPS} !=on [NC] #RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] #### ALTERNATATIVE TO USING ERRORDOCUMENT ### #-> THE Ultimate Htaccess #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule ^.*$ /error.php [L] ### SEO REDIRECTS ### #Redirect 301 /2006/oldfile.html http://subdomain.domain.tld/newfile.html #RedirectMatch 301 /o/(.*)$ http://subdomain.domain.tld/s/dl/$1 #================================================= ============================# # AUTHENTICATION AND SECURITY #================================================= ============================# # THE Ultimate Htaccess # # Require (user|group|valid-user) (username|groupname) ########### ### BASIC PASSWORD PROTECTION ### #AuthType basic #AuthName "prompt" #AuthUserFile /.htpasswd #AuthGroupFile /dev/null #Require valid-user ### ALLOW FROM IP OR VALID PASSWORD ### #Require valid-user #Allow from 192.168.1.23 #Satisfy Any ### PROTECT FILES ### #<FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh) $"> # Order Allow,Deny # Deny from all #</FilesMatch> ### PREVENT HOTLINKING ### #SetEnvIfNoCase Referer "^http://subdomain.domain.tld/" good #SetEnvIfNoCase Referer "^$" good #<FilesMatch "\.(png|jpg|jpeg|gif|bmp|swf|flv)$"> # Order Deny,Allow # Deny from all # Allow from env=good # ErrorDocument 403 http://www.google.com/intl/en_ALL/images/logo.gif # ErrorDocument 403 /images/you_bad_hotlinker.gif #</FilesMatch> ### LIMIT UPLOAD FILE SIZE TO PROTECT AGAINST DOS ATTACK ### #LimitRequestBody 10240000 #bytes, 0-2147483647(2GB) #================================================= ============================# # SSL SECURITY #================================================= ============================# #-> THE Ultimate Htaccess ########### ### MOST SECURE WAY TO REQUIRE SSL ### #-> THE Ultimate Htaccess #SSLOptions +StrictRequire #SSLRequireSSL #SSLRequire %{HTTP_HOST} eq "domain.tld" #ErrorDocument 403 https://domain.tld #================================================= ============================# # SITE UNDER CONSTRUCTION #================================================= ============================# # Heres some awesome htaccess to use when you are developing a site ########### ### COMBINED DEVELOPER HTACCESS CODE-USE THIS ### #<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|js|css|pdf|swf|html|h tm|txt)$"> # Header set Cache-Control "max-age=5" #</FilesMatch> #AuthType basic #AuthName "Ooops! Temporarily Under Construction..." #AuthUserFile /.htpasswd #AuthGroupFile /dev/null #Require valid-user # password prompt for everyone else #Order Deny,Allow #Deny from all #Allow from 192.168.64.5 # Your, the developers IP address #Allow from w3.org # css/xhtml check jigsaw.w3.org/css-validator/ #Allow from googlebot.com # Allows google to crawl your pages #Satisfy Any # no password required if host/ip is Allowed ### DONT HAVE TO EMPTY CACHE OR RELOAD TO SEE CHANGES ### #ExpiresDefault A5 #If using mod_expires #<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|js|css|pdf|swf|html|h tm|txt)$"> # Header set Cache-Control "max-age=5" #</FilesMatch> ### ALLOW ACCESS WITH PASSWORD OR NO PASSWORD FOR SPECIFIC IP/HOSTS ### #AuthType basic #AuthName "Ooops! Temporarily Under Construction..." #AuthUserFile /.htpasswd #AuthGroupFile /dev/null #Require valid-user # password prompt for everyone else #Order Deny,Allow #Deny from all #Allow from 192.168.64.5 # Your, the developers IP address #Allow from w3.org # css/xhtml check jigsaw.w3.org/css-validator/ #Allow from googlebot.com # Allows google to crawl your pages #Satisfy Any # no password required if host/ip is Allowed
    میشه یه توضیح بدید این کدا چه تغییراتی رو سرور ایجاد میکنه

  7. #5
    عضو دائم Woshka آواتار ها
    تاریخ عضویت
    Apr 2009
    نوشته ها
    1,456
    تشکر تشکر کرده 
    55
    تشکر تشکر شده 
    1,524
    تشکر شده در
    1,078 پست

    پیش فرض پاسخ : بهترین تنظیماتhtaccess - robots.txt

    کانفیگ .htaccess به صورت زیر هست و فایل robots.txt هیچ کاری انجام نمیده و فقط به عنون یک استاندارد برای موتور های جست جو هست که توش آدرس نقشه ی سایت و دایرکتوری هایی که میخوای و نمی خوای ایندکس بشن بکار میره


    برای کش کردن
    کد PHP:
    <IfModule mod_expires.c>
    # Enable expirations
    ExpiresActive On 
    # Default directive
    ExpiresDefault "access plus 1 month"
    # My favicon
    ExpiresByType image/x-icon "access plus 1 year"
    # Images
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    # CSS
    ExpiresByType text/css "access 1 month"
    # Javascript
    ExpiresByType application/javascript "access plus 1 year"
    </IfModule

    برای فشرده سازی با deflate
    کد PHP:

    <IfModule mod_deflate.c>
        
    AddOutPutFilterByType DEFLATE text/css text/plain text/html text/plain text/xml application/xml application/xhtml+xml application/javascript application$
        <
    IfModule mod_setenvif.c>
            
    # Netscape 4.x has some problems...
            
    BrowserMatch ^Mozilla/4 gzip-only-text/html

            
    # Netscape 4.06-4.08 have some more problems
            
    BrowserMatch ^Mozilla/4\.0[678no-gzip

            
    # MSIE masquerades as Netscape, but it is fine
            # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

            # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
            # the above regex won't work. You can use the following
            # workaround to get the desired effect:
            
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

            
    # Don't compress images
            
    SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
        
    </IfModule>

        <
    IfModule mod_headers.c>
            
    # Make sure proxies don't deliver the wrong content
            
    Header append Vary User-Agent env=!dont-vary
        
    </IfModule>
    </
    IfModule
    ویرایش توسط Woshka : January 6th, 2014 در ساعت 01:54
    فروش سرور مجازی
    http://www.maroonhost.net/vps-hosting.html
    مارون هاست
    برای خرید سرور تماس بگیرید 09123773197

  8. تعداد تشکر ها از Woshka به دلیل پست مفید


  9. #6
    کاربر اخراج شده
    تاریخ عضویت
    Aug 2012
    محل سکونت
    تبریز
    نوشته ها
    126
    تشکر تشکر کرده 
    852
    تشکر تشکر شده 
    190
    تشکر شده در
    135 پست

    پیش فرض پاسخ : بهترین تنظیماتhtaccess - robots.txt

    نقل قول نوشته اصلی توسط Woshka نمایش پست ها
    کانفیگ .htaccess به صورت زیر هست و فایل robots.txt هیچ کاری انجام نمیده و فقط به عنون یک استاندارد برای موتور های جست جو هست که توش آدرس نقشه ی سایت و دایرکتوری هایی که میخوای و نمی خوای ایندکس بشن بکار میره


    برای کش کردن
    کد PHP:
    <IfModule mod_expires.c>
    # Enable expirations
    ExpiresActive On 
    # Default directive
    ExpiresDefault "access plus 1 month"
    # My favicon
    ExpiresByType image/x-icon "access plus 1 year"
    # Images
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    # CSS
    ExpiresByType text/css "access 1 month"
    # Javascript
    ExpiresByType application/javascript "access plus 1 year"
    </IfModule

    برای فشرده سازی با deflate
    کد PHP:

    <IfModule mod_deflate.c>
        
    AddOutPutFilterByType DEFLATE text/css text/plain text/html text/plain text/xml application/xml application/xhtml+xml application/javascript application$
        <
    IfModule mod_setenvif.c>
            
    # Netscape 4.x has some problems...
            
    BrowserMatch ^Mozilla/4 gzip-only-text/html

            
    # Netscape 4.06-4.08 have some more problems
            
    BrowserMatch ^Mozilla/4\.0[678no-gzip

            
    # MSIE masquerades as Netscape, but it is fine
            # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

            # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
            # the above regex won't work. You can use the following
            # workaround to get the desired effect:
            
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

            
    # Don't compress images
            
    SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
        
    </IfModule>

        <
    IfModule mod_headers.c>
            
    # Make sure proxies don't deliver the wrong content
            
    Header append Vary User-Agent env=!dont-vary
        
    </IfModule>
    </
    IfModule
    تشکر فراوان

    این فایل رو به اسم
    .htaccess
    ذخیره کردم
    تو روت هاستم اپلود

    لازم هست داخل پوشه هم اپلود کنم مثل پوشه مربوط به عکس های صفحه
    یا نه

  10. #7
    عضو دائم Woshka آواتار ها
    تاریخ عضویت
    Apr 2009
    نوشته ها
    1,456
    تشکر تشکر کرده 
    55
    تشکر تشکر شده 
    1,524
    تشکر شده در
    1,078 پست

    پیش فرض پاسخ : بهترین تنظیماتhtaccess - robots.txt

    نقل قول نوشته اصلی توسط Tumrusx نمایش پست ها
    تشکر فراوان

    این فایل رو به اسم
    .htaccess
    ذخیره کردم
    تو روت هاستم اپلود

    لازم هست داخل پوشه هم اپلود کنم مثل پوشه مربوط به عکس های صفحه
    یا نه
    خواهش می کنم
    توی public_html و یا home آپلود کنید کافی هست
    و برای تمامی صفحات و دایرکتوری ها اعمال میشه
    مگر اینکه قصد داشته باشید زمان های منقضی متفاوتی برای فایل های هر دایرکتری ایجاد کنید که کمتر این کار را انچام می دهند
    فروش سرور مجازی
    http://www.maroonhost.net/vps-hosting.html
    مارون هاست
    برای خرید سرور تماس بگیرید 09123773197

  11. تعداد تشکر ها از Woshka به دلیل پست مفید


  12. #8
    کاربر اخراج شده
    تاریخ عضویت
    Dec 2013
    نوشته ها
    84
    تشکر تشکر کرده 
    18
    تشکر تشکر شده 
    73
    تشکر شده در
    58 پست

    پیش فرض پاسخ : بهترین تنظیماتhtaccess - robots.txt

    نقل قول نوشته اصلی توسط Tumrusx نمایش پست ها
    تشکر فراوان

    این فایل رو به اسم
    .htaccess
    ذخیره کردم
    تو روت هاستم اپلود

    لازم هست داخل پوشه هم اپلود کنم مثل پوشه مربوط به عکس های صفحه
    یا نه
    سلام
    برای جوملا هم میشه استفاده کرد؟

  13. تعداد تشکر ها از lordvps.ir به دلیل پست مفید


  14. #9
    عضو دائم Woshka آواتار ها
    تاریخ عضویت
    Apr 2009
    نوشته ها
    1,456
    تشکر تشکر کرده 
    55
    تشکر تشکر شده 
    1,524
    تشکر شده در
    1,078 پست

    پیش فرض پاسخ : بهترین تنظیماتhtaccess - robots.txt

    نقل قول نوشته اصلی توسط lordvps.ir نمایش پست ها
    سلام
    برای جوملا هم میشه استفاده کرد؟
    سلام، lordvps.ir
    صبح بخیر

    هیچ ربطی به سی ام اس خاصی نداره و تحت وب سرور آپاچی بعد از کامایل php اعمال میشه
    من روی سیستم هایی که با فریمورک yii نوشتیم
    و کلی سایت ساخته شده با جوملا
    و همچنین wordpress تست کردم و مشکلی نبوده

    اگر هم دیدی مثلا دوست نداری html یک وبسایت و یا هر پسوند مورد نظرت فشرده کنه می تونی توی خط متناظر هر کدوم رو ورداری
    کد PHP:
    AddOutPutFilterByType DEFLATE text/css text/plain text/html text/plain text/xml application/xml application/xhtml+xml application/javascript application
    مثلا با ورداشتن html به این شکل در خواهد آمد

    کد PHP:
    AddOutPutFilterByType DEFLATE text/css text/plain text/plain text/xml application/xml application/xhtml+xml application/javascript application
    و برای جلوگیری از کش کردن هم می تونی هر سوندی که دوست داری را از توی متن ورداری
    مثلا اگر
    کد PHP:
    ExpiresByType image/gif "access plus 1 month" 
    را ورداری دیگه عکس های با سوند gif کش نمی شوند
    ویرایش توسط Woshka : January 6th, 2014 در ساعت 04:32
    فروش سرور مجازی
    http://www.maroonhost.net/vps-hosting.html
    مارون هاست
    برای خرید سرور تماس بگیرید 09123773197

  15. تعداد تشکر ها از Woshka به دلیل پست مفید


  16. #10
    عضو دائم TARIMEHR آواتار ها
    تاریخ عضویت
    Feb 2012
    محل سکونت
    تهران
    نوشته ها
    1,383
    تشکر تشکر کرده 
    1,361
    تشکر تشکر شده 
    2,912
    تشکر شده در
    1,723 پست

    پیش فرض پاسخ : بهترین تنظیماتhtaccess - robots.txt

    سایت بنده به این نوع کش و فشرده ساز بهترین واکنش را نشان میدهددر زیر قرار میدم تا تست کنین
    میتونین از جی تی متریکس برای انالیز نتایج استفاده کنید

    کد:
    RewriteEngine On
    
        # Turn off ETags
        FileETag None
        Header unset ETag
        # Set Expires headers
        ExpiresActive On
        ExpiresDefault "access plus 1 year"
        ExpiresByType text/html "access plus 1 second"
        ExpiresByType image/gif "access plus 2592000 seconds"
        ExpiresByType image/jpeg "access plus 2592000 seconds"
        ExpiresByType image/png "access plus 2592000 seconds"
        ExpiresByType image/x-icon "access plus 2592000 seconds"
        ExpiresByType text/css "access plus 604800 seconds"
        ExpiresByType text/javascript "access plus 604800 seconds"
        ExpiresByType application/x-javascript "access plus 604800 seconds"
        # Remove Last-Modified header
        Header unset Last-Modified
    
    
    <IfModule mod_headers.c>
        <FilesMatch "\.(bmp|css|flv|gif|ico|jpg|jpeg|js|pdf|png|svg|swf|tif|tiff)$">
            Header set Last-Modified "Tue, 31 Aug 2010 00:00:00 GMT"
        </FilesMatch>
    </IfModule>
    # 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>
    در قلمرو ایمان نیز تسامح هست

صفحه 1 از 2 12 آخرینآخرین

اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. مشکل با فایل Robots
    توسط amirreza0 در انجمن سوالات و مشکلات
    پاسخ ها: 4
    آخرين نوشته: March 9th, 2017, 13:18
  2. robots.txt و ارور 404
    توسط Sir.DarKNesS در انجمن سوالات و مشکلات
    پاسخ ها: 5
    آخرين نوشته: August 31st, 2016, 14:19
  3. محل فایل robots.txt
    توسط sayan99 در انجمن Wordpress
    پاسخ ها: 12
    آخرين نوشته: December 31st, 2015, 12:23
  4. بهترین تنظیماتhtaccess - robots.txt
    توسط Tumrusx در انجمن مباحث دیگر
    پاسخ ها: 0
    آخرين نوشته: December 26th, 2013, 09:43
  5. مشکل در robots.txt
    توسط world در انجمن سوالات و مشکلات
    پاسخ ها: 4
    آخرين نوشته: May 11th, 2013, 11:27

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •