How to redirect from actual folder (5 posts)

  1. redactuk
    Posted 4 years ago #

    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

  2. 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.

  3. redactuk
    Posted 4 years ago #

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

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

  5. redactuk
    Posted 4 years ago #

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

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.