Entendendo este arquivo .htaccess gerado e resolvendo meu problema_

0

Eu baixei e instalei alguns softwares em um servidor web que parece ter gerado um arquivo .htaccess na minha pasta raiz. Eu não me importei no começo, até que percebi que não era capaz de navegar para certas páginas em outros diretórios.

Eu achei que tinha que ser uma coisa de .htaccess, então eu achei o da minha pasta raiz e aqui está:

<IfModule mod_rewrite.c>
    SetEnv HTTP_F_URL On
    RewriteEngine on
    # You may need to set the RewriteBase to point to the root of your
    # Fruml installation if you get HTTP 500 errors.
    # RewriteBase /dev
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?cmd=$1 [QSA,L]
</IfModule>

<IfModule mod_expires.c>
    SetEnv HTTP_EXPIRES On
    ExpiresActive On
    ExpiresByType image/gif A5184000
    ExpiresByType image/png A5184000
    ExpiresByType image/jpeg A5184000
    ExpiresByType application/x-javascript A5184000
    ExpiresByType application/javascript A5184000
    ExpiresByType text/css A5184000
</IfModule>

<IfModule mod_deflate.c>
    # Insert filter
    SetOutputFilter DEFLATE

    # Netscape 4.x has some problems...
    BrowserMatch ozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ozilla/4\.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
    # the above regex won't work. You can use the following
    # workaround to get the desired effect:
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

    # Don't compress images
    SetEnvIfNoCase Request_URI \
    \.(?:gif|jpe?g|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
</IfModule>

o arquivo que estou tentando acessar:

[institutum /home/public]$ ls
Fruml+0.0.14            db                      forum_backup.tar        img
LICENSE.txt             forum                   fruml                   index.php
[institutum /home/public]$ cd db      
[institutum /home/public/db]$ ls
admin   bio     chm     eng     mat     phy
[institutum /home/public/db]$ cd admin
[institutum /home/public/db/admin]$ ls
xoda-0.3.1              xoda-0.3.1.tar.bz2
[institutum /home/public/db/admin]$ cd xoda-0.3.1
[institutum /home/public/db/admin/xoda-0.3.1]$ ls
README                  functions.php           js                      xd_icons
config.sample.php       index.php               style.css               zipstream.php
[institutum /home/public/db/admin/xoda-0.3.1]$ 

index.php na pasta xoda.

Renomear o .htaccess na minha pasta raiz faz com que outros links falhem.

Eu encontrei outro arquivo .htaccess na minha pasta db:

php_flag allow_call_time_pass_reference Off
php_value error_reporting 2047
php_flag magic_quotes_gpc Off
php_flag register_globals Off
php_flag short_open_tag Off
php_flag zend.ze1_compatibility_mode On
    
por n0pe 05.07.2011 / 04:40

1 resposta

0

Tente adicionar RewriteRule ^(db/admin/xoda-0.3.1) - [L] à seção mod_rewite antes das outras diretivas RewriteRule:

<IfModule mod_rewrite.c>
    SetEnv HTTP_F_URL On
    RewriteEngine on
    # You may need to set the RewriteBase to point to the root of your
    # Fruml installation if you get HTTP 500 errors.
    # RewriteBase /dev
    RewriteRule ^(db/admin/xoda-0.3.1) - [L]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?cmd=$1 [QSA,L]
</IfModule>
    
por 05.07.2011 / 05:34