The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
1) .htaccess file to prevent outside users from listing directory contents on the webserver
2) same to stop downloading of files I don't want downloaded (i.e. php functions)
3) An automatic forward to the root of the site from subdirectories?
I'm a little unsure as .htaccess, but need urgent help!
> yeah, did this, and got a
>
> "Directory of
> -----------------
> -----------------"
>
> Which looked a little ugly. With the index.php redirectio back to the
> server root, it looks a little neater.
>
> Cheers all! It's up and running on the test server, going live
> tomorrow if there are no further issues.
Might be neater, but you should be aware that its not actually disabling directory browsing so even if you still want to use that you should keep Options -Indexes in .htaccess in your web root. Its not a big deal though, depends how security conscious you want to be.
Anyway, Options -Indexes should produce a 403 when you try to directory browse (which you can set up a ErrorDocument for in your .htacess to redirect it). I guess you have something in your apache conf thats overriding/conflicting with it though.
> You can just put Options -Indexes in your .htaccess file to disable
> directory browsing.
yeah, did this, and got a
"Directory of
-----------------
-----------------"
Which looked a little ugly. With the index.php redirectio back to the server root, it looks a little neater.
Cheers all! It's up and running on the test server, going live tomorrow if there are no further issues.
> Is it an Apache or Windows server?
>
> You can turn off directory listing normally.
Dunno, but I doubt our service provider would be happy with me changing their settings. I have no access to change the server software. :)
[edit] Apache, on the laptop I was developing on was locked down tight. MySQL users also handled the user logins for image upload. Once I sorted out an account to move the software too, everything changed.....Still, pretty secure now I think.
> Ahh, sweet!
>
> How about if they type
>
> "http://www.
> I'd like a "restricted" to appear, or a redirect to root,
> but still be able to use the images. (I tried Error -403, but
> couldn't use the images)
Is it an Apache or Windows server?
You can turn off directory listing normally.
DOH!. You can tell I'm moving to a live server and fixing a multitude of bugs.
Anyhoo, that works fine. Cheers!
For PHP files you don't want viewed (e.g a functions only page), use the .php extension as mentioned, but put this at the top - where functions.php is the actual filename (it'll redirect the user to a page you want):
if (eregi("functions.php", $_SERVER['PHP_SELF']))
header("Location:/index.php");
How about if they type
"http://www.
1) .htaccess file to prevent outside users from listing directory contents on the webserver
2) same to stop downloading of files I don't want downloaded (i.e. php functions)
3) An automatic forward to the root of the site from subdirectories?
I'm a little unsure as .htaccess, but need urgent help!