Mod_Rewrite working too well?

Discussion in 'Installation/Configuration' started by keyvan, Mar 17, 2009.

  1. keyvan

    keyvan New Member

    Hi,

    Finally got everything working on my SUSE11 ISPConfig setup with mod_rewrite.

    but now it looks like I can't access files that are not going through the rewrite engine.

    For example I can't access images or CSS files (word press)
    If I enter the URL to an image it just takes me to the unformated front page, no images, no css.

    This is what I have in the Apache Directives box.


    Code:
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Have you tried

    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase   /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    ?
     
  3. keyvan

    keyvan New Member

    Hi,

    Thanks, that worked.
    At first that didn't work because I was putting those lines directly in the vhost file instead of the Apache Directives.

    The error message was 'can't use Rewrite base here' so i thought that would apply everywhere.

    Restored backup of vhost file and all works fine.

    Thanks

    Keyvan
     

Share This Page