Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've downloaded and installed some software on a web server which seems to have generated an .htaccess file in my root folder. I didn't care at first, until I realized I wasn't able to navigate to certain pages in other directories.

I figured it had to be an .htaccess thing, so I found the one in my root folder and here it is:

<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>

the file I'm trying to get to:

[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 in the xoda folder.

Renaming .htaccess in my root folder makes other links fail.

I found another .htaccess file in my db folder:

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
share|improve this question
    
What software did you install? –  evan.bovie Jul 5 '11 at 2:50
    
It's called Fruml. A content management system. –  MaxMackie Jul 5 '11 at 2:52
    
What happens if you remove the file? Most of these directives are cosmetic for a personal project. –  evan.bovie Jul 5 '11 at 2:57
    
I'm going to try renaming it to .htaccess_bak, however I don't want to remove some useful definitions here which might protect me. –  MaxMackie Jul 5 '11 at 2:58
    
What aren't you able to access, specifically? –  BenGC Jul 5 '11 at 2:59
show 2 more comments

1 Answer

up vote 0 down vote accepted

Try adding RewriteRule ^(db/admin/xoda-0.3.1) - [L] to the mod_rewite section before the other RewriteRule directives:

<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>
share|improve this answer
    
That didn't work but I found another .htaccess in my db folder. See my question for the code. –  MaxMackie Jul 5 '11 at 11:37
    
Oh and when I said it doesn't work, I meant I get a 404 error. –  MaxMackie Jul 5 '11 at 11:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.