Anvar Logo
01 / 01
Anvar Logo +91 808 999 0405

WordPress redirect all pages to homepage using htaccess

We can redirect all the pages of WordPress website to home page by using the htaccees
Here’s our example: If you want redirect to along with all the other posts that use that same URL format.

# BEGIN redirect to homepage
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/$
RewriteCond %{REQUEST_URI} !\.(gif|jpe?g|png|css|js|php)$
RewriteCond %{REQUEST_URI} !^/wp-admin [NC]
RewriteRule .* / [L,R=301]
#END redirect to homepage
by anvar
Published : May , 24

Post a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.