Support » Plugins » Integrating SPG in a subfolder

  • Hello, I am banging my head on this problem and I dont know enough about htaccess to figure it out. I will try to be as specific as possible but am rather confused myself!!

    My site is setup using “categories” for the front page and “pages” for all else like this:


    I am trying to incorporate SPG gallery into the media/gallery/ folder. The problem is the additional directory (media).

    what i’d like to do if its possible is have the spg gallery load when gallery is selected. At the moment, the gallery page that loads is the page i created within wordpress.

    If I create a “real”media folder and put the gallery folder in it so its like:


    then my other media pages do not work as it conflicts with the virtual site structure. I figure this could be defeated using htaccess but am not sure how to proceed or if its the best way.

    I searched to no avail because all other spg installations seem to use : or and what i need is :

    the ht access is like this:

    DirectoryIndex sp_index.php

    RewriteEngine On
    RewriteBase /gallery/

    RewriteRule ^folder/(.*) sp_index.php?dir=./$1
    RewriteRule ^file/(.*) sp_index.php?file=./$1
    RewriteRule ^thumb/(.*) sp_getthumb.php?source=$1

    is there something i could add here that would make spg perform as if there were an actual “real” folder titled media but at the same time not conflict with the “virtual” site structure wordpress is using?

    btw, i am using wp and spg for wp.

    Thanks in advance,


Viewing 3 replies - 1 through 3 (of 3 total)
  • sorry I do not really understand your situation here, what i know for now is that as long all your gallery in under spg folder, they should be able to load.

    As for masking the real url, url rewrites should work, but I don’t think you have to use RewriteBase /gallery/

    You could also try the Redirectify plugin, found here:

    Thank you zz85 and Kafkaesqui for your suggestions. I will try the redirectify plugin and see whats up. For now i just went for a more basic setup:


    instead of


    If I discover a way to eventually make this work I will post the solution here.



Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Integrating SPG in a subfolder’ is closed to new replies.