I'm pretty sure I've seen it before, but I can't remember what it was.
First I do this:
example.com/foo
translate into
example.com/files/foo
via mod_rewrite. That part is easy.
Then I want it to see if foo.php exists. If not, look for foo.pl or something. If nothing starts with "foo." then give a 404.
This is possible, right? *crosses fingers*
/file will read try to read /file.???
Moderator: General Moderators
hmm..
Ok, I'm doing something different. Still having problems, though.
Yeah, everything redirects.
Ok, so what I want to do is this... If a file in files/ is accessed directly, redirect to the main site (actually, I'd rather have an error page--that possible?). The second is my solution to the above problem. Just give all the files the same extension and be done with it.
Ok, I'm doing something different. Still having problems, though.
Code: Select all
RewriteRule ^files/.* / їR]
RewriteRule ^(їA-Za-z_\-]+)/?$ files/F_$1.sk їL]Ok, so what I want to do is this... If a file in files/ is accessed directly, redirect to the main site (actually, I'd rather have an error page--that possible?). The second is my solution to the above problem. Just give all the files the same extension and be done with it.