<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://entorb.net//wiki/index.php?action=history&amp;feed=atom&amp;title=Apache</id>
	<title>Apache - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://entorb.net//wiki/index.php?action=history&amp;feed=atom&amp;title=Apache"/>
	<link rel="alternate" type="text/html" href="https://entorb.net//wiki/index.php?title=Apache&amp;action=history"/>
	<updated>2026-05-06T10:29:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://entorb.net//wiki/index.php?title=Apache&amp;diff=5402&amp;oldid=prev</id>
		<title>Torben: /* Token Query Parameter protection */</title>
		<link rel="alternate" type="text/html" href="https://entorb.net//wiki/index.php?title=Apache&amp;diff=5402&amp;oldid=prev"/>
		<updated>2026-03-17T05:31:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Token Query Parameter protection&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
==.htaccess==&lt;br /&gt;
===basics===&lt;br /&gt;
 # a different .htaccess file can be stored in each subfolder &lt;br /&gt;
 &lt;br /&gt;
 # set the timezone&lt;br /&gt;
 SetEnv TZ Europe/Berlin&lt;br /&gt;
 &lt;br /&gt;
 # do not generate a index.htm listing of the files&lt;br /&gt;
 Options -Indexes&lt;br /&gt;
 # can be turned on for a specifiv subfolder by using another .htaccess &lt;br /&gt;
 # in that folder containing &amp;quot;Options Indexes&amp;quot; without the &amp;quot;-&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # disable the display on index-pages for files matching * = all&lt;br /&gt;
 IndexIgnore *.jpg&lt;br /&gt;
 &lt;br /&gt;
 # ensure that http://entorb.net --&amp;gt; http://www.entorb.net&lt;br /&gt;
 RewriteCond %{HTTP_HOST} !^www\.entorb\.net$&lt;br /&gt;
 RewriteRule ^(.*)$ http://www.entorb.net/$1 [L,R=301]&lt;br /&gt;
&lt;br /&gt;
===Password===&lt;br /&gt;
Ask for a password when accessing a folder&lt;br /&gt;
 &lt;br /&gt;
[http://httpd.apache.org/docs/1.3/howto/htaccess.html]&lt;br /&gt;
Create a new passwd file&lt;br /&gt;
 htpasswd -c -m /some/path/passwd.file myUser&lt;br /&gt;
Add another user&lt;br /&gt;
 htpasswd -m /some/path/passwd.file myUser2&lt;br /&gt;
&lt;br /&gt;
( at Uberspace the &amp;lt;passwd.file&amp;gt; has to be located below /var/www/virtual/&amp;lt;USER&amp;gt;/ )&lt;br /&gt;
&lt;br /&gt;
.htaccess:&lt;br /&gt;
 AuthType Basic&lt;br /&gt;
 AuthName &amp;quot;some Text&amp;quot;&lt;br /&gt;
 AuthUserFile /some/path/passwd.file&lt;br /&gt;
 AuthBasicProvider file&lt;br /&gt;
 Require valid-user&lt;br /&gt;
&lt;br /&gt;
===Token Query Parameter protection===&lt;br /&gt;
 # require a token query parameter to be set&lt;br /&gt;
 RewriteEngine On&lt;br /&gt;
 RewriteCond %{QUERY_STRING} !token=asdf&lt;br /&gt;
 RewriteRule ^ - [F]&lt;br /&gt;
&lt;br /&gt;
===URL Rewrite for wiki===&lt;br /&gt;
see&lt;br /&gt;
[http://www.stephan-hertz.de/blog/modrewrite-und-suchmaschinen-optimierung-fur-ein-wiki-via-htaccess/]&lt;br /&gt;
, [http://www.mediawiki.org/wiki/Manual:Short_URL/wiki/Page_title_--_DreamHost_Shared_Hosting]&lt;br /&gt;
or [http://www.mediawiki.org/wiki/Manual:Short_URL/wiki/Page_title_--_no_root_access]&lt;br /&gt;
&lt;br /&gt;
my case: wiki stored unter folder wiki, using virtual folder wickie&lt;br /&gt;
 # Wiki: convert request using /index.php?title=XYZ -&amp;gt;/XYZ&lt;br /&gt;
 # only apply the following to wiki urls&lt;br /&gt;
 RewriteCond %{REQUEST_URI} .*(wickie|wiki).* [nocase]&lt;br /&gt;
 RewriteCond %{THE_REQUEST} \?title=(.+)\ HTTP&lt;br /&gt;
 RewriteRule ^.*$ http://www\.entorb\.net/wickie/%1? [R=301,L]&lt;br /&gt;
 &lt;br /&gt;
 # Short URLs for Wiki&lt;br /&gt;
 #http://www.mediawiki.org/wiki/Manual:Short_URL/wiki/Page_title_--_DreamHost_Shared_Hosting&lt;br /&gt;
 RewriteEngine On&lt;br /&gt;
 # only apply the following to wiki urls&lt;br /&gt;
 RewriteCond %{REQUEST_URI} .*(wickie|wiki).* [nocase]&lt;br /&gt;
 RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
 RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;
 RewriteRule ^(.+)$ /wiki/index.php?title=$1 [L,QSA]&lt;br /&gt;
 # in LocalSettings.php&lt;br /&gt;
 $wgUsePathInfo = true;&lt;br /&gt;
 $wgScriptPath       = &amp;quot;/wiki&amp;quot;; # real path&lt;br /&gt;
 $wgScriptExtension  = &amp;quot;.php&amp;quot;;&lt;br /&gt;
 $wgScript           = &amp;quot;$wgScriptPath/index$wgScriptExtension&amp;quot;;&lt;br /&gt;
 $wgArticlePath = &amp;quot;/wickie/$1&amp;quot;; # virtual path&lt;br /&gt;
&lt;br /&gt;
==robots.txt==&lt;br /&gt;
Place in webservers-root-dir. To keep search robots out of some of your folders. Attention: this file my be a hint for intruders...&lt;br /&gt;
 User-agent: *&lt;br /&gt;
 Disallow: /privateStuff/&lt;br /&gt;
 Disallow: /Gallery/&lt;/div&gt;</summary>
		<author><name>Torben</name></author>
	</entry>
</feed>