How to redirect subfolder to domain root through htaccess

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

RewriteRule ^subfolder$ http://www.domain.com [R=301,L]

Or,

Redirect 301 /subfolder    http://www.yourdomain.com

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 *