Веб-строительствоКак сделать 301 всех страниц на главную у WordPress 26.03.2021 qvaro 5 октября 2020, 17:23 69Подскажите, пожалуйста, как сделать 301 всех страниц на главную через .htaccess. .Которые решения нашел в интернете ломают сайт. Хочу попробовать сделать лэндинг. Посмотреть как будет вести себя сайт.Если норм, оставлю. Если нет, то мог бы вернуть все страницы быстро.Сейчас .htaccess такой:# BEGIN GzipWpFastestCache <IfModule mod_deflate.c> AddType x-font/woff .woff AddType x-font/ttf .ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript 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-font-ttf AddOutputFilterByType DEFLATE x-font/ttf AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE font/opentype font/ttf font/eot font/otf </IfModule> # END GzipWpFastestCache # BEGIN LBCWpFastestCache <FilesMatch ".(webm|ogg|mp4|ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|otf|ttf|svg|eot)(.gz)?$"> <IfModule mod_expires.c> AddType application/font-woff2 .woff2 AddType application/x-font-opentype .otf ExpiresActive On ExpiresDefault A0 ExpiresByType video/webm A10368000 ExpiresByType video/ogg A10368000 ExpiresByType video/mp4 A10368000 ExpiresByType image/webp A10368000 ExpiresByType image/gif A10368000 ExpiresByType image/png A10368000 ExpiresByType image/jpg A10368000 ExpiresByType image/jpeg A10368000 ExpiresByType image/ico A10368000 ExpiresByType image/svg+xml A10368000 ExpiresByType text/css A10368000 ExpiresByType text/javascript A10368000 ExpiresByType application/javascript A10368000 ExpiresByType application/x-javascript A10368000 ExpiresByType application/font-woff2 A10368000 ExpiresByType application/x-font-opentype A10368000 ExpiresByType application/x-font-truetype A10368000 </IfModule> <IfModule mod_headers.c> Header set Expires "max-age=A10368000, public" Header unset ETag Header set Connection keep-alive FileETag None </IfModule> </FilesMatch> # END LBCWpFastestCache # BEGIN LSCACHE # END LSCACHE # BEGIN NON_LSCACHE # END NON_LSCACHE #This Apache config file was created by Duplicator Installer on 2019-08-28 08:29:48. #The original can be found in archived file with the name htaccess.orig # 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 TES 5 октября 2020, 17:32 RewriteEngine onRewriteOptions inheritRewriteCond %{REQUEST_URI} (.*)RewriteRule ^(.*)$ https://доменное имя/ [L,R=301] dma84 5 октября 2020, 17:39 TES #:RewriteCond %{REQUEST_URI} (.*)Это-то нахрена? Не лень лишнее-то писать? qvaro 5 октября 2020, 18:32 TES #: RewriteEngine onRewriteOptions inheritRewriteCond %{REQUEST_URI} (.*)RewriteRule ^(.*)$ https://доменное имя/ [L,R=301]Спасибо! Похожие записи:Почему шрифт в firefox отображается не правильно?Как улучшить навыки программирования?Google Fonts | Font AwesomeИспользование свойств класса в другом классе301 редирект в .htaccess по маске
qvaro
Подскажите, пожалуйста, как сделать 301 всех страниц на главную через .htaccess. .
Которые решения нашел в интернете ломают сайт.
Хочу попробовать сделать лэндинг. Посмотреть как будет вести себя сайт.
Если норм, оставлю. Если нет, то мог бы вернуть все страницы быстро.
Сейчас .htaccess такой:
TES
RewriteEngine on
RewriteOptions inherit
RewriteCond %{REQUEST_URI} (.*)
RewriteRule ^(.*)$ https://доменное имя/ [L,R=301]
dma84
RewriteCond %{REQUEST_URI} (.*)
Это-то нахрена? Не лень лишнее-то писать?
qvaro
RewriteEngine on
RewriteOptions inherit
RewriteCond %{REQUEST_URI} (.*)
RewriteRule ^(.*)$ https://доменное имя/ [L,R=301]
Спасибо!