rewrite dinamic link to url
- Started
- Last post
- 4 Responses
- Corvo2
Hello.
I have a php index file outputting the contents in each directory to divs:
..
[DIR_1]
[DIR_2]
file.txt
anotherfile.zipBut say I want an exception to DIR_2 where it will not list the files inside it, but instead run another html+php shell to display the contents of that dir (in this case it's only images)
Can this be done with the rewrite rule for that directory?
www.site.com/index.php?dir=PROJEā¦... (lists dir contents)
www.site.com/PROJECTS (runs index.html)
Ty.
- acescence0
your question is not making sense.
- Corvo20
It's not? hmm... Maybe I'm looking wrong at this then.
I'll have another go at this tomorrow, and bump it... it's really late now. My brains are shutting down.
tx.
- heavyt0
i dig what you are saying.
you cannot do this with only htaccess, you gotta use PHP to do a selective recursive print like this.
you can just look for that key in the URL and use that as a flag to scan_dir on the chosen directory.
- heavyt0
BTW - it seems like you are way over your head on this project. If you want some code that does all this already, I can zip it up and send it to you. Cant guarantee you'll understand it all.