Add rewrite rule in .htaccess

25 views Asked by At

I am wanting to prepend parent directory to serve /child i.e.

user Entered URL website.com/child
serves website.com/parent/child

child naming scheme CN-XX000 
"CN-"   static
`"XX000" dynamic (wildcard?)

Any/All Suggestions & Help Much Appreciated! I am not knowledgeable re: htaccess and have not attempted any changes.

OK, so I put on my thinking cap and this is what I came up with. Does anyone see any negatives or issues? It appears to be working...

    # START Forward URL Campaigns
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^CN-$
    RewriteRule ^CN-$\/?(.*)$ "https\:\/\/dtnarecalls\.com\/Campaigns\/$1" [R=301,L]
    </IfModule>
    # END Forward URL Campaigns
0

There are 0 answers