Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 675

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 675

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 675

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/v166574/fusca/wiki/includes/MagicWord.php on line 675
.htaccess – Mein Wiki

.htaccess

Aus Mein Wiki

Wechseln zu: Navigation, Suche
(Samples)
(Samples)
Zeile 49: Zeile 49:
  RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com
  RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com
  RewriteRule ^(.*)$ http://domain.com/subdomains/%1/$1 [L,NC,QSA]
  RewriteRule ^(.*)$ http://domain.com/subdomains/%1/$1 [L,NC,QSA]
 +
 +
=== ... ===
 +
###################################################
 +
# Turn the RewriteEngine on.                      #
 +
###################################################
 +
 +
RewriteEngine on
 +
 +
###################################################
 +
# Add a leading www to domain if one is missing.  #
 +
###################################################
 +
# If this rule is used, the rewriting stops here  #
 +
# and then restarts from the beginning with the  #
 +
# new URL                                        #
 +
###################################################
 +
 +
RewriteCond %{HTTP_HOST} !^www\.
 +
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
 +
 +
###################################################
 +
# Do not process images or CSS files further      #
 +
###################################################
 +
# No more processing occurs if this rule is      #
 +
# successful                                      #
 +
###################################################
 +
 +
RewriteRule \.(css|jpe?g|gif|png)$ - [L]
 +
 +
###################################################
 +
# Add a trailing slash if needed                  #
 +
###################################################
 +
# If this rule is used, the rewriting stops here  #
 +
# and then restarts from the beginning with the  #
 +
# new URL                                        #
 +
###################################################
 +
 +
RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$
 +
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]
 +
 +
###################################################
 +
# Rewrite web pages to one master page            #
 +
###################################################
 +
# /somepage/            => master.php            #
 +
#                            ?page=somepage      #
 +
# /somesection/somepage => master.php            #
 +
#                            ?section=somesection #
 +
#                            &page=somepage      #
 +
# /somesection/somesub/somepage/                  #
 +
#                      => master.php            #
 +
#                            ?section=somesection #
 +
#                            &subsection=somesub  #
 +
#                            &page=somepage      #
 +
###################################################
 +
# Variables are accessed in PHP using            #
 +
# $_GET['section'], $_GET['subsection'] and      #
 +
# $_GET['page']                                  #
 +
###################################################
 +
# No more processing occurs if any of these rules #
 +
# are successful                                  #
 +
###################################################
 +
 +
RewriteRule ^([^/\.]+)/?$ /master.php?page=$1 [L]
 +
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ /master.php?section=$1&page=$2 [L]
 +
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /master.php?section=$1&subsection=$2&page=$3 [L]
= Authentifizierung mit .htaccess =
= Authentifizierung mit .htaccess =

Version vom 02:02, 18. Jun. 2013

Persönliche Werkzeuge