How to redirect subfolder to domain root through htaccess

We can use the following rules to redirect subfolder to root through htaccess.

RewriteRule ^subfolder$ [R=301,L]


Redirect 301 /subfolder

Here we need to replace folder name and domain name appropriately.

That's all….

Leave a Reply

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