How do I enable subdirectories to be created with prosites?

How do I enable subdirectories to be created with prosites?

Currently when someone registers it creates a domain that looks like this:

example.niimpress.ca

which is perfect. But I want a subdirectory for that specific folder to be created as well when they sign up. How do I do this?

    • Aaron

      That would be perfect. Here is my .htaccess:

      # BEGIN WPSuperCache
      <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
      #If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
      AddDefaultCharset UTF-8
      RewriteCond %{REQUEST_URI} !^.*[^/]$
      RewriteCond %{REQUEST_URI} !^.*//.*$
      RewriteCond %{REQUEST_METHOD} !POST
      RewriteCond %{QUERY_STRING} !.*=.*
      RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
      RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
      RewriteCond %{HTTP:Accept-Encoding} gzip
      RewriteCond %{HTTPS} on
      RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz -f
      RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]

      RewriteCond %{REQUEST_URI} !^.*[^/]$
      RewriteCond %{REQUEST_URI} !^.*//.*$
      RewriteCond %{REQUEST_METHOD} !POST
      RewriteCond %{QUERY_STRING} !.*=.*
      RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
      RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
      RewriteCond %{HTTP:Accept-Encoding} gzip
      RewriteCond %{HTTPS} !on
      RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f
      RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz" [L]

      RewriteCond %{REQUEST_URI} !^.*[^/]$
      RewriteCond %{REQUEST_URI} !^.*//.*$
      RewriteCond %{REQUEST_METHOD} !POST
      RewriteCond %{QUERY_STRING} !.*=.*
      RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
      RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
      RewriteCond %{HTTPS} on
      RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
      RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]

      RewriteCond %{REQUEST_URI} !^.*[^/]$
      RewriteCond %{REQUEST_URI} !^.*//.*$
      RewriteCond %{REQUEST_METHOD} !POST
      RewriteCond %{QUERY_STRING} !.*=.*
      RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
      RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
      RewriteCond %{HTTPS} !on
      RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
      RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]
      </IfModule>

      # END WPSuperCache

      # BEGIN WordPress
      <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
      RewriteRule ^index\.php$ - [L]

      # add a trailing slash to /wp-admin
      RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

      RewriteCond %{REQUEST_FILENAME} -f [OR]
      RewriteCond %{REQUEST_FILENAME} -d
      RewriteRule ^ - [L]
      RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
      RewriteRule ^(.*\.php)$ $1 [L]
      RewriteRule . index.php [L]
      </IfModule>

      # END WordPress

  • Ivan

    Hi Aaron,

    Since Pro Sites require WordPress Multi Site to work on top of it, it is a more of a question how WordPress Multi Site store it's data.

    Either ways - with subdirectories or subdomains WordPress Multi Site won't separate the the sub sites and stores their data in different folders - it will use files from the root directory for the plugins and themes. Subsites information will be stored in the database.

    After user creates a site most of the information about it, it will be stored in the MySQL database, so you won't see any new folders created. And the directory structure inside the installation will be the same.

    Hope this makes sense.

    Thanks,
    Ivan

  • aristath

    Hello again @Aaron and a happy new year! :slight_smile:

    Is there a plugin that allows users to access the files under a particular install. something like wp-eXtplorer ?

    I'm afraid not.
    Allowing your users to access the filesystem would be a major security issue and that's why it's not allowed.
    If for example I had access to your files I could write a single line of code in my theme's functions.php file and become the superadmin of your site, hacking everything!

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.