.htaccess - redirect /subdirectory to /symlink/subdirectory where /symlink points to / -
i'm working on drupal7 multisite setup based on subdirectories example.com used main website , example.com/subsite standalone drupal install. subsite symlink located in root directory , pointing root directory give subsite access drupal core files.
now have make static content available via example.com/subsite/static, created directory static in root directory. works fine.
the problem is, example.com/static accessable , want prevent that.
i tried redirect requests /static /subsite/static resulting in inconsistent behaviour , redirect loops.
directory structure:
/ /{various drupal directories} /subsite -> / /static
rewrite rule:
rewriterule ^/static/(.*)$ /subsite/static/$1 [r,l]
thx in advance
is want?
rewritebase / rewriterule ^static/(.*)$ /subsite/static/$1 [l,r=301] rewriterule ^subsite/static/(.*)$ /static/$1 [l]
- in first line redirect call
/static/
/subsite/static/
. - in second line rewrite call
/subsite/static/
/static
.
if doesn't work please post whole .htaccess
file.
Comments
Post a Comment