Want a simple htaccess to redirect html root filename to a sub-directory.
www.xyz.com/About****.php where **** is arbitrary. The words "About" and ".php" are fixed
convert to www.xyz.com/coach/articles/About****.php
Haven't used regular expressions and htaccess for many years. Relearning curve is time consuming.
CodePudding user response:
This will redirect every URL that matches About****.php
to coach/articles/About****.php
RewriteEngine On
RewriteRule ^About(.*).php$ coach/articles/About$1.php [L,R=301]
CodePudding user response:
I wasn't clear. the **** are arbitrary characters, as in About_xyz.php" and About_Jack_jumped.php and About XYZ.php With a space character. \