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
(Cheat Sheets)
(Samples)
Zeile 36: Zeile 36:
  #differently. If you want you can add an extra parameter too, like:
  #differently. If you want you can add an extra parameter too, like:
  RewriteRule /path/index.php /path/iphone.php?extra=param [QSA,L]
  RewriteRule /path/index.php /path/iphone.php?extra=param [QSA,L]
 +
 +
=== subdomain to folder/directory ===
 +
Is it possible to use .htaccess to rewrite a sub domain to a directory?
 +
Example: http://sub.domain.com/ shows the content of http://domain.com/subdomains/sub/
 +
 +
RewriteEngine on
 +
RewriteCond %{HTTP_HOST} ^sub.domain.com
 +
RewriteRule ^(.*)$ http://domain.com/subdomains/sub/$1 [L,NC,QSA]
 +
#For a more general rule (that works with any subdomain, not just sub)
 +
#replace the last two lines with this:
 +
RewriteEngine on
 +
RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com
 +
RewriteRule ^(.*)$ http://domain.com/subdomains/%1/$1 [L,NC,QSA]
= Authentifizierung mit .htaccess =
= Authentifizierung mit .htaccess =

Version vom 02:00, 18. Jun. 2013

Persönliche Werkzeuge