• Hi, I’m trying to run multisite on my shared hosting with specific settings for folders. In root i have domains and subdom folders and here’s my .htaccess

    RewriteEngine On

    # cele domeny (aliasy)
    RewriteCond %{REQUEST_URI} !^domains/
    RewriteCond %{REQUEST_URI} !^/domains/
    RewriteCond %{HTTP_HOST} ^(www\.)?(.*)$
    RewriteCond %{DOCUMENT_ROOT}/domains/%2 -d
    RewriteRule (.*) domains/%2/$1 [DPI]
    
    # subdomeny (s nebo bez www na zacatku)
    RewriteCond %{REQUEST_URI} !^subdom/
    RewriteCond %{REQUEST_URI} !^/subdom/
    RewriteCond %{HTTP_HOST} ^(www\.)?(.*)\.([^\.]*)\.([^\.]*)$
    RewriteCond %{DOCUMENT_ROOT}/subdom/%2 -d
    RewriteRule (.*) subdom/%2/$1 [DPI]
    
    # aliasy - spravne presmerovani pri chybejicim /
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^domains/[^/]+/(.+[^/])$ /$1/ [R]
    
    # subdomeny - spravne presmerovani pri chybejicim /
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^subdom/[^/]+/(.+[^/])$ /$1/ [R]

    If I set multisite with subdomain settings it doesn’t work.
    Thanks for help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Folders and .htaccess’ is closed to new replies.