linux - Redirect multiple folders to single folder -
i wonder if it's possible following: so, when new hosting, start few folders right? .. , add few more folders, css, js, imgs, assets, media... , on, after 1 year have 20 folders, girlfriend special card, cousin school project, dad's portfolio, few "clients" mom sent them charity page, , on, after few years have 100 folders! crazy!the 80% of of folders active, have many facebook fanpage fancy iframe... , on..
so question, how can send of request folders different folder, have:
domain.com
|_css
|_js
|_folder1
|_fancy1
|_mydadprofile
|_mysisterpictures
|_imgs
picture...
what following
domain.com
|_css
|_js
|_oldstuff
| |_folder1
| |_mydadportfolio
| |_fancy1
| |_mysisterpictures
|_imgs
if user request dad's portfolio gets redirection new folder if go facebook fanpage , see iframe page still able see information...
i thinking use .htaccess same way error redirected, 404 errors, 403, 301... don't know how implemented...
i appreciate this, thank all
you can rewrite requests rewriterule
rewriterule ^mydadprofile.*$ /oldstuff/$0 [l]
for multiple rewrites, can add further rules.
if want combine them 1 long rule, can use
rewriterule ^(?:mydadprofile|mysisterpictures|folder1|fancy1).*$ /oldstuff/$0 [l]
Comments
Post a Comment