Anvar Freelance Web Designer and SEO Expert Logo
01 / 01
WhatsApp 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 old-website.com/blog/post to new-website.com/ 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 *