WordPress.org

Ready to get started?Download WordPress

Forums

Sub-domain to Sub-directory setup (6 posts)

  1. seifen
    Member
    Posted 1 year ago #

    Hello,

    I just installed a WP network to my site http://www.maxadinamuskler.se. My aspiration was to create a "sub-blog" on the adress: http://www.maxadinamuskler.se/seifsblogg. But since I'm a beginner at this, somehow I created the network being based on subdomains. So the only network websites/blogs I could create would be like this http://www.seif.maxadinamuskler.se.

    I might already have screwed it up, but I wonder if it's possible to change. Any advice?

    Best regards,
    Seif

  2. How many sub-blogs do you have? If you don't have any, it's really easy. If you have some, then it's still somewhat easy.

  3. seifen
    Member
    Posted 1 year ago #

    Hi,
    That's great! How do I do it? Where should i make changes?
    Seif

  4. http://codex.wordpress.org/Multisite_Network_Administration#Switching_network_types

    You edit your wp-config.php, your .htaccess, and then if you have any sites, you will have to edit your DB so they now point to subdomains.

    I found it easier to make a new subdomain, and then use that as a sort of template for the old ones.

  5. seifen
    Member
    Posted 1 year ago #

    Nice! Thanks.. I missed that one ;p

    I have one more question and this will be the last one! The guide says I have to make configurations in my .htaccess as well.. whats to change there? It doesn't say what to change in the guide and I'm not sure what to do about it!

    Seif

  6. wpfranner
    Member
    Posted 1 year ago #

    You should put this in as your .htaccess file.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    Remember to remove the old wordpress settings from the file.

    For reference http://codex.wordpress.org/Multisite_Network_Administration#.htaccess_and_Mod_Rewrite

Topic Closed

This topic has been closed to new replies.

About this Topic