IT аутсорсинг в Витебске • ИП Сергей Мастыков
Velcom +375 (29) 625-74-06
Velcom +375 (29) 897-68-99

.htaccess и robots.txt для WordPress

Просмотров: 141Комментарии: 0
WordPress
wp-htaccess

Свежеустановленный WordPress имеет в своей корневой директории файл .htaccess примерно такого содержания:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# END WordPress
# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
 
# Custom PHP Settings
#php_value post_max_size 30M
#php_value upload_max_filesize 30M
#php_value memory_limit 256M
#php_value max_execution_time 180
 
# Output ERROR information
#php_flag display_startup_errors on
#php_flag display_errors on
#php_flag html_errors on
 
 
# BEGIN WP Performance Score Booster Settings
## BEGIN GZIP Compression ##

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE image/svg+xml
SetOutputFilter DEFLATE

## END GZIP Compression ##
 
## BEGIN Vary: Accept-Encoding Header ##


Header append Vary: Accept-Encoding


## END Vary: Accept-Encoding Header ##
 
## BEGIN Leverage Browser Caching (Expires Caching) ##

ExpiresActive On
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresDefault "access 1 month"

## END Leverage Browser Caching (Expires Caching) ##
 
## BEGIN Disable ETag header ##
Header unset Pragma
Header unset ETag
FileETag None
## END Disable ETag header ##
# END WP Performance Score Booster Settings

Файл robots.txt:

User-agent: *
Disallow: /wp-admin/
Disallow: /wp-json/
Allow: /wp-admin/admin-ajax.php
 
Host: https://mastykov.by
Sitemap: https://mastykov.by/sitemap_index.xml

Можно скачать архив 5 с этими двумя файлами .htaccess и robotx.txt.

Оставьте комментарий!


Комментарий будет опубликован после проверки

     

  

(обязательно)