Jump to content

Talk:.htaccess

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by SineBot (talk | contribs) at 23:32, 26 December 2007 (Signing comment by 85.211.32.107 - ""). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Someone please fix the spanish in this article... +sj + 07:23, 22 Apr 2005 (UTC)


Deny users by Country

Is that possible modify the htaccess file to deny by country? --Saphire diablo 10:32, 30 April 2006 (UTC)[reply]

Sure. You can block domains, for instant. You can also deny access to certain IP ranges (you'd have to find them on the web). However, what's the point?
1. It can be easily overridden by an anonymous proxy (lock them if you can).
2. Domains are registered in one country, but administered worldwide. It's possible that some people are in a global TLD, or in another country's (Tuvalu is popular, as is Armenia, or FS of Micronesia).
3. IP ranges are in a complete disarray now. You can't reliably predict the location of the ip address. Even if you can, the reported IP is frequently something completely diferent from the actual IP.
4. Even if you account for all the above, the user will find a way to access your data if it's really that important.
BTW, what data can be so important as to block users from a certain country from accessing it? And what country is it???
I'd assume it'd be for political rather than security purposes... - furrykef (Talk at me) 04:45, 15 August 2006 (UTC)[reply]

Space in url

Can spaces be used in the url for redirection e.g. RedirectPermanent /old%20one.html http://www.wiki.co.nz/new.html this does not seem to work for me, I get a 404 Onco_p53 11:34, 24 July 2006 (UTC)[reply]

404 is a client error. It might be possible that the browser is interpreting the %20 wrong and doesn't change it into a space, but expects actually spelled out "%20" in the address. Have you tried quoting the addresses?
RedirectPermanent "/old%20one.html" "http://www.wiki.co.nz/new.html"

HTTP_HOST .htaccess example

The example given for HTTP_HOST does not actually work in .htaccess files, at least with the popular Apache 1.3 server. Does it work with 2.x?

Ok the HTTP_HOST example is fixed.. —The preceding unsigned comment was added by Produke (talkcontribs).

Password protection

AuthGroupFile /dev/null

Is not absolutely necessary, I suggest removing. —The preceding unsigned comment was added by Bah23 (talkcontribs) 12:19, 22 January 2007 (UTC).[reply]

Password protection - htpasswd command

htpasswd /home/newuser/www/stash/.htpasswd newuser

I believe you need -c?? —The preceding unsigned comment was added by Bah23 (talkcontribs) 12:19, 22 January 2007 (UTC).[reply]

Sorry for not signing! I'm new.--Bah23 12:21, 22 January 2007 (UTC)[reply]
I know this is the wrong place to post this... but is there a way to autosign? —The preceding unsigned comment was added by Bah23 (talkcontribs) 12:23, 22 January 2007 (UTC).[reply]
Just type ~~~~ after your message – Qxz 02:13, 23 January 2007 (UTC)[reply]

Article disruption

I think it's disappointing this article has now been stripped of all content, the article was slowly improving and becoming useful, but now it's basically gone! I strongly disagree with this opinion that Wikipedia should focus as an encyclopedia, this makes little sense to me, why not use it for a communal resource, we already have encyclopedias! When I type 'htaccess' in Google, this article is one of the top results, so why can't it tell visitors how to use .htaccess files? Or at least link to resources which can? This article effectively adds to the bulk of rubbish that already exists on the Internet, this site is meant to be an educational resource! Nobody wants an article explaining that a .htaccess file is something you use with the Apache Web Server, whilst this is an important piece of information, visitors needed to be guided to the next stage of learning, either by using this article to explain the file usage, or to link to other content which does! .htaccess files are not part of a commercial product, they are part of an open source project and are supported by millions of web servers, detailed documentation and guidance should un-questionably be included in this article!

CSS example

The CSS example doesn't have much to do with .htaccess, really. He's using a PHP script, and mod_rewrite to redirect the CSS requests to that script. If anything that can be configured via .htaccess belongs in this article, it's going to be a big one...

No filename

If anyone knows why the file has only an extension and no filename, it's probably worth mentioning as it seems a notable point. —Preceding unsigned comment added by 85.211.32.107 (talk) 23:30, 26 December 2007 (UTC)[reply]