Page 1 of 1

Replace auto indexing? <or> Fix mod_rewrite

Posted: Sat Sep 23, 2006 7:31 pm
by Skara
Is it possible to auto index folders with your own file?

Edit: If that isn't possible, could someone tell me what's wrong with this?

Code: Select all

<Directory "/fileserver">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    <IfModule mod_rewrite>
      RewriteEngine On
      RewriteRule ^/fileserver/([^\.]+) /files/$1 [L]
    </IfModule>
</Directory>
where..
DocumentRoot "/fileserver"
..and..
/fileserver
/fileserver/files
/fileserver/files/example

I want
http://localhost/example
to read from
http://localhost/files/example

But--- Only directories, no files.

Basically I want to make it appear as if the files directory doesn't exist... if that makes sense.

Posted: Sun Sep 24, 2006 11:17 am
by Skara
Ok, I had some more time to test it. wtf.

I cannot get mod_rewrite to work. I don't know why, but it doesn't. at all.

LoadModule rewrite_module modules/mod_rewrite.so #<< /is/ loaded...

Code: Select all

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Satisfy all
    RewriteEngine On
    RewriteRule ^/test /test2 [R,L]
</Directory>
or

Code: Select all

<Directory "/fileserver">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    RewriteEngine On
    RewriteRule ^/test /test2 [R,L]
</Directory>
nothing happens.

And yes, I'm restarting apache each time I change httpd.conf. And yes, it's the correct file.

this is retarded. ideas?