ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Move segment positions

March 12, 2012 8:31pm

Subscribe [2]
  • #1 / Mar 12, 2012 8:31pm

    Symon Pritchett

    11 posts

    I currently have a MSM site running 2 sites with domains:

    http://www.site1.com
    site2.site1.com

    The clients IT department are having problems accessing the sub domain site and insist the sub domain site be moved to the new address of:

    http://www.site1.com/site2

    I’ve added the following to the .htaccess file which is correctly pointing the new domain:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^site2(.*)$ /sites/site2/index.php?/$1 [L]

    The problem I’m having now is that because the templates are controlled via segments,
    segment_1 is now segment_2

    I’m also using Freebie in this setup.

    So my question?
    Is there a way to make the system think that segment_2 is segment_1?


    Thanks

    Symon :O)

     

     

  • #2 / Mar 13, 2012 12:46am

    Symon Pritchett

    11 posts

    Ok, I fixed this by:

    1. no need for the .htaccess condition.
    2. added a folder /site2 to root level
    3. index file inside that points to the /sites/site2 dir (not redirect)

    needed to add global var to point to the asset folder ( for css and js includes ) of /sites/site2 dir

  • #3 / Mar 13, 2012 12:24pm

    Kyle Cotter

    730 posts

    Glad you were able to figure it out Symon!

    If you have any more questions, feel free to post again.

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases