Submit Your Article Forum Rules

Results 1 to 6 of 6

Thread: .htaccess / ModRewrite not allowed for security reasons?

  1. #1

    .htaccess / ModRewrite not allowed for security reasons?

    I tried using a .htaccess file containing mod/write 's and my hosting provider doesn't allow this particular file due to "security reasons" - caused my site to be down for 2 days, before I realized the problem. I'm trying to block webstrippers and bad bots with this. I don't understand what would cause a security problem, since I'm not a programmer. I collected the information from various sources on the internet.

    Is there an alternative way to block the nasty bots without using the mod/write lines?

  2. #2
    Senior Member redcircle's Avatar
    Join Date
    Aug 2003
    Posts
    424
    because with modrewrite you could have it direct to any world readable file on the server.
    www.squitosoft.com - PHP development site. featuring Squito Gallery. a php driven photo gallery.
    www.rgfx.net - Specializing in Internet solutions, including Html authoring, Interactive Web sites, 3D/2D Graphics and animation.

  3. #3

    AHH! I See!

    Thanks for that explanation.
    So, is it the same sense of security using a robots.txt file with references to those bots?

    For example:

    Code:
    User-agent: WebZip/4.0
    Disallow: /
    
    User-agent: BlackWidow
    Disallow: /
    I don't see the difference between the robots.txt file and .htaccess file, except the fact that some robots ignore the robots.txt file, correct?

  4. #4
    Senior Member redcircle's Avatar
    Join Date
    Aug 2003
    Posts
    424
    In some ways you are correct. the .htaccess file can also control many other things on the server if something is wrong it that may lead to instability on the server and not just your site.
    www.squitosoft.com - PHP development site. featuring Squito Gallery. a php driven photo gallery.
    www.rgfx.net - Specializing in Internet solutions, including Html authoring, Interactive Web sites, 3D/2D Graphics and animation.

  5. #5

    Question

    So, if I'm using .htaccess files (for example, I have one that points to a custom 404 page) on my hosting company's server - not my own - I could cause problems on THEIR server? And would this cause problems for everyone else on the particular server, as well?

    ooohh...man. I didn't realize the capabilities or possibilities associated with a simple htaccess file!

  6. #6
    There is not much, if anything at all in the .htaccess that would affect server stability. They apply only to the folder, and sub folders of that folder. So if you put a .htaccess in your document folder, it will have an effect on that folder, plus every subfolder, unless you create one within the subfolder and override it.

    Even silly things like sending a 404 document to a document that doesn't exist could cause an infinite loop of 404 errors, but apache is not stupid, and will catch on the first iteration and output something like "in addition there was a 404 error trying to retrieve ErrorDocument".

    robots.txt is a file that a robot should read, and obey.

    .htaccess is something with directs apache what to do. If you block the bot, the bot will simply receive a forbidden code, not even being able to view your site.

    Things like php and cgi can output any world readable file too, unless the server is otherwise setup.

Similar Threads

  1. Wordpress SEO & Security Friendly .htaccess & Pugins
    By Webnauts in forum Internet Security Discussion Forum
    Replies: 23
    Last Post: 03-29-2012, 08:50 AM
  2. ModRewrite: How to redirect [domain].com to www.[domain].com
    By inflectionpt in forum Web Programming Discussion Forum
    Replies: 2
    Last Post: 02-12-2005, 08:12 AM
  3. Is this allowed?
    By swansea123452002 in forum eCommerce Discussion Forum
    Replies: 7
    Last Post: 12-14-2004, 02:10 PM
  4. Top 10 Reasons to Convert to XHTML & Top 5 Reasons Not T
    By Narasinha in forum Graphics & Design Discussion Forum
    Replies: 17
    Last Post: 12-12-2003, 01:00 AM

Posting Permissions

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