.htaccess problem

Discussion in 'Installation/Configuration' started by statiic, Nov 13, 2006.

  1. statiic

    statiic New Member

    I have installed an perfect setup and now I added an new clients website.

    I Inserted an .htaccess file for the website to have smartlinks.

    But now it doesnt work. It tells me that the file is incorrect setted or something like that.

    Here is the file

    Code:
    #Php Magic Quotes
    php_flag register_globals off
    php_flag magic_quotes_gpc off
    php_flag magic_quotes_runtime off
    # php_flag error_reporting "E_ALL ^ (E_NOTICE | E_WARNING)"
    
    
    ##############################
    
    # Permalinks
    RewriteEngine on
    
    ##############################
    
    # Google Sitemap
    RewriteRule ^sitemap/?$ sitemap.php [NC]
    
    # RSS Feed
    RewriteRule ^rss/?$ rss.php [NC]
    
    ##############################
    
    # Idioma
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(_([A-Za-z]{2}))/?$ /index.php?l=$2 [L]
    RewriteRule ^(.*)/_([A-Za-z]{2})/?$ /index.php?l=$2 [L]
    
    # Secciones
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php [L]
    
    And which httpd.conf file do I need to change if I want to setup the session expire time for all my clients?
     
    Last edited: Nov 13, 2006
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the exact error message that you get in the error.log file of the website.
     
  3. statiic

    statiic New Member

    Where can I find this file??
     
  4. falko

    falko Super Moderator ISPConfig Developer

    The global error log normally is something like /var/log/apache2/error.log or /var/log/httpd/error.log.
     
  5. statiic

    statiic New Member

    I use ispconfig and now its in the users personal folder ;)

    But here are my errors:

    The first one for the full .htaccess without mods:
    [Tue Nov 14 17:35:41 2006] [alert] [client 192.168.1.12] /var/www/web2/web/.htaccess: php_flag not allowed here
    [Tue Nov 14 17:35:41 2006] [alert] [client 192.168.1.12] /var/www/web2/web/.htaccess: php_flag not allowed here


    Then when I take out the php_flags:
    [Tue Nov 14 17:36:18 2006] [error] [client 192.168.1.12] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /var/www/web2/web/
    [Tue Nov 14 17:36:18 2006] [error] [client 192.168.1.12] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /var/www/web2/web/error/forbidden.html
     
  6. statiic

    statiic New Member

    I installed an perfect setup for mandriva 2007 with ispconfig, but where can I find the correct httpd.conf for my client websites??

    Because I have 2 of them. And I dont know which one is the right one.

    I also cannot find anyting with /var/www/web2/web/

    Could someone explain this?
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Make sure you enabled the PHP module in Apache.


    You could put something like
    Code:
    <Directory /var/www/web2/web/>
      Options +FollowSymLinks
    </Directory>
    into the vhost configuration.
     
  8. falko

    falko Super Moderator ISPConfig Developer

    I think it's in /etc/httpd or /etc/httpd2 or something like this. You can search for it:
    Code:
    updatedb
    locate httpd.conf
    or run
    Code:
    httpd -V
    Do you have a Vhosts_ispconfig.conf? What's in there?
     
  9. orfi

    orfi New Member

    detailed solution

    ===============================================
    add the directive in the panel for apache directives and check if it is ok in : /etc/apache2/vhosts/Vhosts_ispconfig.conf

    #--------------------------------
    # rewrite on problem in .htaccess
    #--------------------------------
    <IfModule mod_rewrite.c>
    <Directory /srv/www/web1/web/>
    Options +FollowSymLinks
    </Directory>
    </IfModule>
    #---------------------------------


    and Falko is right again

    This was modified on : SUSE11 /php5/
     
    Last edited: Oct 20, 2008

Share This Page