1

I know. This sounds complicated =D I made a PHP file browser, as an alternative to the apache one. I needed it for logic purposes, it does extra things for me, &etc. So instead of dropping this file in all of my directories, how could I get it to "show up" in all my directories that don't have an index (would use the apache dirlisting by default)? Thanks for the help!

Edit

I wonder if this could be done using Alias and DirectoryIndex? Is it possible to alias to a file?

0

Not actually helping but it can be done easily in nginx. Here's how I did it.

  • Hm. Thanks! I just wish I could do this in Apache without an edit to the mod_autoindex sources. – Kyle Feb 12 '10 at 7:56
0

Could you use URL rewriting to change all urls ending in "/foldername" or "/foldername/" (i.e. not ".html") to /myscript?folder=foldername ?

0

I use something like this for my zend framework projects. It tells index.php to handle every request for files that don't already exist. You can get creative with the regular expressions or add other RewriteConds to be more selective about when it sends the request to the index.php.

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /path/to/index.php [NC,L]

See the Apache Documentation for descriptions of the flags and for the full list of server variables.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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