Home > Back-end >  .htaccess rename rule for rewrite but internally append
.htaccess rename rule for rewrite but internally append

Time:12-29

I have a URL of the form www.aroundnext.org/Scholastic/Home , how may I change it to www.aroundnext.org/Home whilst internally appending Scholastic

CodePudding user response:

RewriteEngine On
RewriteRule ^Scholastic/Home/(.*)$ /Home/$1 [R=301,NC,L]

This redirects files in a old directory (www.aroundnext.org/Scholastic/Home) to a new directory (www.aroundnext.org/Home). The file must exist in the new directory to function.

  • Related