<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>salasana &#8211; Tarkkaamo</title>
	<atom:link href="https://jml.kapsi.fi/jussi/tag/salasana/feed/" rel="self" type="application/rss+xml" />
	<link>https://jml.kapsi.fi/jussi</link>
	<description>Jussi Linkolan blogi ja kotisivusto</description>
	<lastBuildDate>Mon, 21 Jan 2013 06:37:32 +0000</lastBuildDate>
	<language>fi</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://jml.kapsi.fi/jussi/wp-content/uploads/2015/11/cropped-Tarkkaamo-favicon-Target2_512-32x32.png</url>
	<title>salasana &#8211; Tarkkaamo</title>
	<link>https://jml.kapsi.fi/jussi</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>.htaccess -salasanasuojattu alihakemisto WordPressiin</title>
		<link>https://jml.kapsi.fi/jussi/2012/09/26/htaccess-salasanasuojattu-alihakemisto-wordpressiin/</link>
		
		<dc:creator><![CDATA[Jussi Linkola]]></dc:creator>
		<pubDate>Wed, 26 Sep 2012 09:18:01 +0000</pubDate>
				<category><![CDATA[Oppaat]]></category>
		<category><![CDATA[Verkkojulkaiseminen]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[salasana]]></category>
		<category><![CDATA[suojaus]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">http://jml.kapsi.fi/jussi/?p=1419</guid>

					<description><![CDATA[Ongelma: WordPressin alle luodaan hakemisto, joka halutaan suojata .htaccess -salasanasuojauksella , mutta kun tarvittavat määritykset on tehty, hakemisto ohjautuukin WordPressin 404 Not Found -virhesivulle. Mistä se johtuu?: Tavoiteltu autentikointitapa &#8221;HTTP Basic Authentication&#8221; palauttaa selaimelle virhekoodin 401 Unauthorized, joka normaalitilanteessa toisi näkyviin kirjautumisikkunan. Nyt kuitenkin WordPressin oman, päähakemistossa sijaitsevan .htaccess -tiedoston Rewrite -sääntöjen käsittelyssä 401-virhe ohjautuu [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Ongelma</strong>: WordPressin alle luodaan hakemisto, joka halutaan suojata <a href="http://appro.mit.jyu.fi/opetusteknologia/luennot/luento3/">.htaccess -salasanasuojauksella</a> , mutta kun tarvittavat määritykset on tehty, hakemisto ohjautuukin WordPressin <strong>404 Not Found</strong> -virhesivulle. </p>
<p><img fetchpriority="high" decoding="async" src="http://jml.kapsi.fi/jussi/wp-content/uploads/2012/09/wordpress-logo-hoz-rgb.png" alt="" title="WordPress" width="498" height="113" class="aligncenter size-full wp-image-1459" /></p>
<p><strong>Mistä se johtuu?</strong>: Tavoiteltu autentikointitapa &#8221;<em>HTTP Basic Authentication</em>&#8221; palauttaa selaimelle virhekoodin <strong>401 Unauthorized</strong>, joka normaalitilanteessa toisi näkyviin kirjautumisikkunan. Nyt kuitenkin WordPressin oman, päähakemistossa sijaitsevan .htaccess -tiedoston Rewrite -sääntöjen käsittelyssä 401-virhe ohjautuu WordPressin omalle 404 -virhesivulle.</p>
<p><span id="more-1419"></span></p>
<h2>Ratkaisu: 401-virheen sivuuttaminen</h2>
<p>Tämä lienee yksinkertaisin ratkaisu ongelmaan. Selaimelle palautetaan 401-virheen yhteydessä kustomoitu, tekstimutoinen virheviesti, jonka jälkeen WordPressin Rewrite ei enää käsittele ilmoitusta.</p>
<p>Alla <code>ErrorDocument 401 "Unauthorized Access"</code> -rivi on lisätty suojattavan alihakemiston .htaccess -tiedoston alkuun, mutta sen voi liittää myös WordPressin .htaccess -tiedostoon.</p>
<pre><code>ErrorDocument 401 "Unauthorized Access"
AuthType Basic
AuthName "testisivusto"
AuthUserFile "/home/eijulkinenhakemisto/.htsalasanatiedosto"
require valid-user</code>
</pre>
<h3>Lähteet &#038; linkit</h3>
<ul>
<li><a href="http://www.andrewrollins.com/2008/01/22/wordpress-and-htaccess-password-protected-directories/">WordPress and .htaccess Password Protected Directories | Andrew Rollins</a></li>
<li><a href="http://httpd.apache.org/docs/2.2/custom-error.html">Custom Error Responses &#8211; Apache HTTP Server</a></li>
<li><a href="http://www.hacksar.com/blog/2010/01/28/how-to-password-protect-a-subdirectory-with-htaccess-with-wordpress-installed/">How-To: Password Protect a Subdirectory with htaccess with WordPress Installed &#8211; Hacksar</a> &#8211; Sisältää vaihtoehtoisen ratkaisun, jossa WordPressin .htaccess -tiedostossa pyritään estämään halutun hakemiston käsittely Rewrite -säännöillä (ei toiminut minulla).</li>
</ul>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
