Search code examples
pathexpressionengine

Expression Engine Path variable issue with Multisite


I have this site which uses multisite manager for minisites.

The issue i am having is that my minisites are in subfolder of the main site and when i use

{path='minisite/group'}

it creates a path like this

/index.php/minisite/group

when in fact i need the following

/minisite/index.php/group

is there a to make it aware of the baseurl for the minisite being in a subfolder.


Solution

  • One way to get around this would be to remove "index.php" from your URLs. This is a common task in ExpressionEngine development. There's a great how-to on removing "index.php" from your ExpressionEngine sites here. I've also used the following code in my .htaccess file to remove the "index.php":

    # If you can't access the control panel at the folder level (ie "http://site.com/system/"), uncomment the following line.
    # DirectoryIndex index.php
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule (.*) index.php?/$1
    

    After removing "index.php" from your URLs, you should be able to use {path="} without error. Let us know if this isn't the case.