WordPress.org

Support

Support » Multisite » How to redirect from actual folder

How to redirect from actual folder

  • Searched and searched but can’t find way to do this:

    I’ve setup brand new multisite installion on a local WAMP server, and created one sub site. so I have:

    http://localhost/ <— my root site
    http://localhost/site2/ <– my first sub site

    I also have an actual folder called site2.
    In addition I’ve set up permalinks.

    My problems is that my site2 Home page link points to http://localhost/site2/ which is therefore displaying a directory listing rather than showing my site2 nominated home page. How to I change this?

    Note: Ideally I want to be able to access other static files in the site2 folder and subfolders, so all I’m trying to do is simply redirect when the root of that folder is requested.

    Any help appreciated
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • I also have an actual folder called site2.

    Don’t do that. Delete it.

    WordPress handles this via virtual subfolders, but if you make one, it overrides that.

    Thanks for reply, but I need the subfolder to install other non-wp apps that I want to appear below site2.

    You don’t. I mean, you can’t do that if you want WordPress to work correctly.

    hmmm well since I last posted been playing around and putting an index.php in the /site2/ folder with:

    <?php
    header("Location: ../site2/home");
    ?>

    Seems to work, though I had to create a page called Home and set it up as the ‘Front page displays’. Having done this I can still acces my site2 subfolders ok. I guess the only issue is to make sure I have have naming conflict between a site2 page and one of the subfolder files.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to redirect from actual folder’ is closed to new replies.
Skip to toolbar