Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question "Wildcards" for PHP directory names?

    Hey all - silly question: Is it possible to use some sort of "wildcard" character for directory names?

    I ask because I've thought about using directories with "blank" names for security purposes, as an a user outside the server is incapable of viewing the folder... as the url would technically be "http://www.website.com/dir//file.ext" (which I think is rather sneaky).

    So... yay or nay?

  • #2
    New Coder
    Join Date
    May 2009
    Posts
    55
    Thanks
    1
    Thanked 4 Times in 4 Posts
    How exactly are you going to create unamed folders?

  • #3
    GŁtkodierer
    Join Date
    Apr 2009
    Posts
    2,127
    Thanks
    1
    Thanked 426 Times in 424 Posts
    Concerning programming style, sneakiness is not at all a desired property.

    You should use .htaccess to block outside access to folders.

  • #4
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Re: hthought - WinXP can create blank folders by using copy/paste during a rename using particular unicode characters; Windows won't paste the character.. but instead renames the folder as having no name.

    I've done tests, and these folders work fine on all Linux, Mac, and Windows... oddly enough

    And.. re: venegal - This is for a homebrew plug-n-play CMS (you just drop it on a PHP5 server and run it... and it works.) - So no htaccess is "allowed" for this one

    That being said - Any suggestions?

  • #5
    GŁtkodierer
    Join Date
    Apr 2009
    Posts
    2,127
    Thanks
    1
    Thanked 426 Times in 424 Posts
    Why would .htaccess not be allowed? You just drop it on the server and it works too.

  • #6
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Only because it's possible that someone might also have an .htaccess file on their server already

    I'm just trying to make this as idiot-proof as possible :P

    So far, though, PHP doesn't seem to be able to decipher any invisible characters :'(

  • #7
    GŁtkodierer
    Join Date
    Apr 2009
    Posts
    2,127
    Thanks
    1
    Thanked 426 Times in 424 Posts
    But there already being an .htaccess file somewhere on the server poses no problem -- yours would just be sitting around in your own restricted folder, not caring about what all those other .htaccess files out there are doing. I implore you, forget about your blank directory name security solution.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •