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.

Removing index.php but excluding assets folders

April 21, 2010 5:39am

Subscribe [2]
  • #1 / Apr 21, 2010 5:39am

    Bloom-Media

    8 posts

    Hi,

    I’ve been reading through endless posts on mod_rewrite but it seems like a bit of a voodoo art so I thought I’d just ask for some advice :D I’m trying to remove index.php from my EE install (Microsoft IIS, ISAPI 2.0) using a httpd.ini (.htaccess) file.

    My CSS, JS and other assets are stored in an /assets/ folder in the root of my web space

    /assets/js             <-- Javascript
    /assets/css            <-- CSS
    /assets/img/layout     <-- Layout images
    /assets/img/content    <-- Content images

    My template groups are called ‘home’, ‘entries’ and ‘news’ and I haven’t changed the default weblog name. I use pagination throughout the site.

    So far I have the following:

    RewriteCond %{REQUEST_URI} !^assets/js [NC]
    RewriteCond %{REQUEST_URI} !^assets/css [NC]
    RewriteCond %{REQUEST_URI} !^assets/img [NC]
    RewriteCond %{REQUEST_URI} !^assets/img/content [NC]
    RewriteCond %{REQUEST_URI} !^assets/img/layout [NC]
    RewriteCond $1 ^(weblog|member|search|Forum_Name|home|entries|news|P[0-9]{2,8}) [NC]
    RewriteRule ^(.*)$ /index.php?$1 [L]

    However, when I test the site using the url :

    http://www.mysite.com/home

    I get the page loading fine but without any CSS styling or images in place.

    Furthermore, whilst reloading it for testing, I often get a “You have exceeded the allowed page load frequency.” message which suggests their may be some recursive looping going on (although it may just be that it doesn’t like being reloaded twice a second for a few consecutive seconds)?

    Does anybody have any ideas what I may be doing wrong? Should I also have the ‘system’ folder mentioned in the RewriteCond somewhere?

    Any feedback would be greatly appreciated.

    Thanks,

    Bloom

    Edit: We have a commercial license - not sure if this makes any difference 😉

  • #2 / Apr 21, 2010 7:16am

    Steven Grant

    894 posts

    Hi Bloom - I used to run on Windows and I had the exclude method working fine.

    Have a look in the forums for ISAPI rewrite posted by Steven Grant.

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

ExpressionEngine News!

#eecms, #events, #releases