Jump to content

Talk:.htaccess: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
Produke (talk | contribs)
mNo edit summary
Implementing WP:PIQA (Task 26)
 
(40 intermediate revisions by 26 users not shown)
Line 1: Line 1:
{{oldafdfull|date=17 January 2007|result='''redirect until it's cleaned up'''}}
Someone please fix the spanish in this article... [[User:Sj|+sj ]][[User Talk:Sj|<font color="#ff6996">+</font>]] 07:23, 22 Apr 2005 (UTC)
{{WikiProject banner shell|class=Start|
{{WikiProject Software |importance=High |computing-importance=High}}
}}

== Several Webservers ==
The comment that this is supported by several webservers is strange, Apache is a continuation of NCSA which developed the .htaccess technology. So, this is mainly an Apache (see references) technology; in the top 5 used Web Server Softwares, Apache and LiteSpeed would be the only two that support it, and LiteSpeed (a fork of apache?) which is a direct apache drop in replacement. In fact, I do not know more than 1 other Web Server software that support this at all... could this be reworded to provide more factual context? [[User:Kaylus|Kaylus]] ([[User talk:Kaylus|talk]]) 18:31, 27 January 2016 (UTC)

== ### ==
Someone please fix the spanish in this article... [[User:Sj|+sj ]][[User Talk:Sj|<span style="color:#ff6996;">+</span>]] 07:23, 22 Apr 2005 (UTC)




Line 8: Line 17:
:1. It can be easily overridden by an anonymous proxy (lock them if you can).
: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).
: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.
: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 different 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.
: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.
:
:
Line 20: Line 29:
: 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?
: 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"
: RedirectPermanent "/old%20one.html" "http://www.wiki.co.nz/new.html"
:: It actually works to quote the old address without the %20 as follows:
:: Redirect permanent "/old one.html" http://www.wiki.co.nz/new_one.html <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/206.138.130.2|206.138.130.2]] ([[User talk:206.138.130.2|talk]]) 21:01, 30 July 2011 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->


== HTTP_HOST .htaccess example ==
== HTTP_HOST .htaccess example ==
Line 26: Line 37:


Ok the HTTP_HOST example is fixed..
Ok the HTTP_HOST example is fixed..
<small>—The preceding [[Wikipedia:Signatures|unsigned]] comment was added by [[User:Produke|Produke]] ([[User talk:Produke|talk]] • [[Special:Contributions/Produke|contribs]]){{#if:{{{2|}}}|&#32;{{{2}}}|}}.</small><!-- Template:Unsigned -->

== Password protection ==

''AuthGroupFile /dev/null''

Is not absolutely necessary, I suggest removing. <small>—The preceding [[Wikipedia:Sign your posts on talk pages|unsigned]] comment was added by [[User:Bah23|Bah23]] ([[User talk:Bah23|talk]] • [[Special:Contributions/Bah23|contribs]]) 12:19, 22 January 2007 (UTC).</small><!-- HagermanBot Auto-Unsigned -->

== Password protection - htpasswd command ==

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

I believe you need -c?? <small>—The preceding [[Wikipedia:Sign your posts on talk pages|unsigned]] comment was added by [[User:Bah23|Bah23]] ([[User talk:Bah23|talk]] • [[Special:Contributions/Bah23|contribs]]) 12:19, 22 January 2007 (UTC).</small><!-- HagermanBot Auto-Unsigned -->

:Sorry for not signing! I'm new.--[[User:Bah23|Bah23]] 12:21, 22 January 2007 (UTC)

::I know this is the wrong place to post this... but is there a way to autosign? <small>—The preceding [[Wikipedia:Sign your posts on talk pages|unsigned]] comment was added by [[User:Bah23|Bah23]] ([[User talk:Bah23|talk]] • [[Special:Contributions/Bah23|contribs]]) 12:23, 22 January 2007 (UTC).</small><!-- HagermanBot Auto-Unsigned -->

::: Just type <code><nowiki>~~~~</nowiki></code> after your message – [[User:Qxz|Qxz]] 02:13, 23 January 2007 (UTC)

== 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. <small>—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/85.211.32.107|85.211.32.107]] ([[User talk:85.211.32.107|talk]]) 23:30, 26 December 2007 (UTC)</small><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->

:Thanks, added explanation to the lead section. It's actually not an extension, just a [[dot-file]]. -- [[user:intgr|intgr]]&nbsp;<small>[[user talk:intgr|[talk]]]</small> 02:52, 28 December 2007 (UTC)

== Regarding rewrite rules ==

Although often used in conjunction with PHP. PHP, in fact has nothing to do with the rewrite process itself. I think the explanation of the rewrite module should be reworded. [[Special:Contributions/66.11.77.89|66.11.77.89]] ([[User talk:66.11.77.89|talk]])

== What is the purpose of HTAccess File ==

That means why we are using the Htaccess files <small>—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/123.201.129.6|123.201.129.6]] ([[User talk:123.201.129.6|talk]]) 05:47, 12 April 2008 (UTC)</small><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
:Check out [[.htaccess#Common usage]] for why we are using the Htaccess files and for What is the purpose of HTAccess File. Both questions are answered in that one section. Also this here is not the place to talk about the content of the article but rather to discuss the article its self. Perhaps that is your intention. Are you suggesting a rename of "Common usage" section? Im not sure what your asking/telling/typing/trying to say. [[User:R00m c|R00m c]] ([[User talk:R00m c|talk]]) 05:55, 13 April 2008 (UTC)

== creation on windows ==

it would be good if there was a mention of how you cant make this filename on windows, i.e. it complains you must type a filename <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/60.242.227.50|60.242.227.50]] ([[User talk:60.242.227.50|talk]]) 07:36, 9 February 2009 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->

== correction needed? ==

<blockquote>
For each HTTP request there are additional file-system accesses for every parent directory when using .htaccess.</blockquote>
Maybe it should read "child directory" instead of "parent directory".
[[User:Doru001|Doru001]] ([[User talk:Doru001|talk]]) 08:26, 29 April 2009 (UTC)

:I guess what was meant is "the directory being accessed and every parent directory thereof"; made sense to me when i first read it. Maybe it's clearer if that statement is rephrased altogether. -- [[user:intgr|intgr]]&nbsp;<small>[[user talk:intgr|[talk]]]</small> 17:13, 29 April 2009 (UTC)

== Deletion ==

Please do not delete this page, I find it very useful. [[User:Doru001|Doru001]] ([[User talk:Doru001|talk]]) 08:26, 29 April 2009 (UTC)
Very useful page

== Examples ==

The page needs a few examples, and explicit links to more. [[Special:Contributions/94.30.84.71|94.30.84.71]] ([[User talk:94.30.84.71|talk]]) 08:55, 7 June 2014 (UTC)
:I fully agree! [[User:Askapache|Askapache]] ([[User talk:Askapache|talk]]) 03:31, 7 October 2014 (UTC)

Latest revision as of 18:22, 10 January 2024

Several Webservers

[edit]

The comment that this is supported by several webservers is strange, Apache is a continuation of NCSA which developed the .htaccess technology. So, this is mainly an Apache (see references) technology; in the top 5 used Web Server Softwares, Apache and LiteSpeed would be the only two that support it, and LiteSpeed (a fork of apache?) which is a direct apache drop in replacement. In fact, I do not know more than 1 other Web Server software that support this at all... could this be reworded to provide more factual context? Kaylus (talk) 18:31, 27 January 2016 (UTC)[reply]

###

[edit]

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


Deny users by Country

[edit]

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 different 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

[edit]

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"
It actually works to quote the old address without the %20 as follows:
Redirect permanent "/old one.html" http://www.wiki.co.nz/new_one.html — Preceding unsigned comment added by 206.138.130.2 (talk) 21:01, 30 July 2011 (UTC)[reply]

HTTP_HOST .htaccess example

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

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]

Thanks, added explanation to the lead section. It's actually not an extension, just a dot-file. -- intgr [talk] 02:52, 28 December 2007 (UTC)[reply]

Regarding rewrite rules

[edit]

Although often used in conjunction with PHP. PHP, in fact has nothing to do with the rewrite process itself. I think the explanation of the rewrite module should be reworded. 66.11.77.89 (talk)

What is the purpose of HTAccess File

[edit]

That means why we are using the Htaccess files —Preceding unsigned comment added by 123.201.129.6 (talk) 05:47, 12 April 2008 (UTC)[reply]

Check out .htaccess#Common usage for why we are using the Htaccess files and for What is the purpose of HTAccess File. Both questions are answered in that one section. Also this here is not the place to talk about the content of the article but rather to discuss the article its self. Perhaps that is your intention. Are you suggesting a rename of "Common usage" section? Im not sure what your asking/telling/typing/trying to say. R00m c (talk) 05:55, 13 April 2008 (UTC)[reply]

creation on windows

[edit]

it would be good if there was a mention of how you cant make this filename on windows, i.e. it complains you must type a filename —Preceding unsigned comment added by 60.242.227.50 (talk) 07:36, 9 February 2009 (UTC)[reply]

correction needed?

[edit]

For each HTTP request there are additional file-system accesses for every parent directory when using .htaccess.

Maybe it should read "child directory" instead of "parent directory". Doru001 (talk) 08:26, 29 April 2009 (UTC)[reply]

I guess what was meant is "the directory being accessed and every parent directory thereof"; made sense to me when i first read it. Maybe it's clearer if that statement is rephrased altogether. -- intgr [talk] 17:13, 29 April 2009 (UTC)[reply]

Deletion

[edit]

Please do not delete this page, I find it very useful. Doru001 (talk) 08:26, 29 April 2009 (UTC) Very useful page[reply]

Examples

[edit]

The page needs a few examples, and explicit links to more. 94.30.84.71 (talk) 08:55, 7 June 2014 (UTC)[reply]

I fully agree! Askapache (talk) 03:31, 7 October 2014 (UTC)[reply]