From 1973290a7aafe620e8312898e1cb44ab1002b0ae Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Mon, 14 Oct 2024 16:52:32 +0200 Subject: [PATCH] Kapitel 04: URLs umschreiben --- conf/kapitel/kapitel_04.conf | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 conf/kapitel/kapitel_04.conf diff --git a/conf/kapitel/kapitel_04.conf b/conf/kapitel/kapitel_04.conf new file mode 100644 index 0000000..cb33846 --- /dev/null +++ b/conf/kapitel/kapitel_04.conf @@ -0,0 +1,34 @@ +##### Kapitel 4 - URLs umschreiben + +### mod_alias + +Include conf/extra/httpd-autoindex.conf + +Alias /sysdoc/ "/usr/share/doc/" + + Options Indexes + AllowOverride None + Require all granted + + + +### mod_userdir + +LoadModule userdir_module modules/mod_userdir.so + +Include conf/extra/httpd-userdir.conf + +### mod_rewrite + +LoadModule rewrite_module modules/mod_rewrite.so + +RewriteEngine On +RewriteRule ^/zwei\.html$ /eins.html +RewriteRule ^/drei\.html$ /eins.html [R] + +## Weiteres +RewriteRule vier.html /eins.html [R] +RewriteRule ^/google\.html$ http://google.de [R] +RewriteRule ^/ssl\.html$ https://localhost/ssl.html [R] +RewriteRule phpmyadmin http://www.disney.com [R,NC] +