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.

Static site alongside EE site?

March 18, 2011 1:14pm

Subscribe [3]
  • #1 / Mar 18, 2011 1:14pm

    strudel

    195 posts

    Greetings,

    I’ve started converting a static site to EE, but decided because of time constraints to leave one big chunk of it (an online store) static for now. Whoops!

    I was thinking that if I just point to the actual page that it would still function (like “mydomain.com/store/index.html”—but when I try that, I just get back to the front page.

    I’m using an .htaccess file to get rid of the index.php, by the way—not sure if that is affecting it.

    So the question: can I link from an EE page to a static page on the same site? If not, what’s the easiest way to get around this?

    Thanks for any ideas!

  • #2 / Mar 18, 2011 1:39pm

    Rob Allen

    3118 posts

    Does the link work if you disable .htaccess? If it does then you know .htaccess needs a tweak!

    Yes you can link to anywhere from an EE site, I’ve built several sites that are part EE, part shopping cart. Normally the cart lives in a subdirectory, /shop, /store etc.

  • #3 / Mar 18, 2011 3:06pm

    strudel

    195 posts

    Does the link work if you disable .htaccess? If it does then you know .htaccess needs a tweak!

    Yes you can link to anywhere from an EE site, I’ve built several sites that are part EE, part shopping cart. Normally the cart lives in a subdirectory, /shop, /store etc.

    I tried disabling .htaccess, but there was no change.

    I’ve got the store (it’s an ancient, hand-coded site!) in a directory, but a directory that is sitting alongside the EE stuff.

    It’s got an address of mydomain.com/store/index.html, and typing that directly into the address bar of a browser still just brings me to the front page.

    Any ideas of what I might be doing wrong?

  • #4 / Mar 18, 2011 4:22pm

    antiuser

    44 posts

    What does your .htaccess file look like?

  • #5 / Mar 18, 2011 4:24pm

    strudel

    195 posts

    What does your .htaccess file look like?

    RewriteEngine on
    RewriteCond $1 !^(images|SYSTEMDIRECTORY|themes|index\.php|admin\.php) [NC]
    RewriteRule ^(.*)$ /index.php/$1 [L]

    This is pretty much what I use in general…. Do you see something amiss in there?

  • #6 / Mar 18, 2011 4:26pm

    antiuser

    44 posts

    Add ‘store’ to your list of skipped directories… so

    RewriteCond $1 !^(store|images|SYSTEMDIRECTORY|themes|index\.php|admin\.php) [NC]

    I’m not an .htaccess wiz but I’m thinking that should work.

  • #7 / Mar 18, 2011 4:32pm

    strudel

    195 posts

    Hmm, I thought that might do it, but no. Same result, unfortunately.

    I remember having a site behave properly, mixing static and dynamic pages, but I can’t figure out the problem with this.

  • #8 / Mar 18, 2011 4:34pm

    antiuser

    44 posts

    Oh weird, that usually does the trick for me. You don’t have any templates or entries titled ‘store’ in your EE setup do you? Because I think that’d get overridden no matter what.

  • #9 / Mar 18, 2011 4:37pm

    strudel

    195 posts

    I had hopes, too! And, no, nothing named ‘store’ anywhere….

  • #10 / Mar 18, 2011 6:32pm

    strudel

    195 posts

    Hmmm, interesting! I should remember to always clear my cache when things seem odd!

    I went to another site I’ve got up that mixes static pages with EE pages, and it works fine. So I checked and noticed that I didn’t have an .htaccess file there.

    I went back to the site in question, cleared the caches of my browsers, and voilá—it’s fine!

    Thanks so much for the assistance!

  • #11 / Mar 18, 2011 9:39pm

    handyman

    509 posts

    My entire site of thousands of pages has consisted of a mix for a decade - so there is certainly no problem mixing all the various pieces (static, handwritten, other software, etc.) together.

    In my case, the root directory and most of the first level are static…...the EE directory and paths are further down. I did that because EE was added long after the site existed, and it took me years (still not done…never will be) to move content to EE. Once I moved an article, I’d do a redirect in the .htaccess…...

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

ExpressionEngine News!

#eecms, #events, #releases