.Htaccess

Redirect www to non www properly (wildcard / any hostname)

RewriteEngine On RewriteBase /

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

 

Redirect www.example.com to example.com (with hostname):

RewriteEngine on

RewriteCond %{HTTP_HOST} ^example.com [NC]

RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]

Mit Webmin habe ich ein Virtualhost erstellt. Wenn ich über Browser die Website aufrufe bekomme ich 403 Error. Wenn ich unter /var/logs/error_logs anschaue sehe ich folgende Meldung:

[Sat May 10 18:20:52 2014] [crit] [client 85.182.26.***] (13)Permission denied: /home/mysite/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Was mache ich falsch?

Hallo zusammen. Ich habe einen VServer bei Hosteruope und möchte einen Ordner mit .htaccess schützen, aber die .htaccess wird gar nicht ausgeführt. was mache ich falsch? De Benutzername ist admin und passwort ist 123456.

.htaccess
AuthUserFile /is/htdocs/wp1../protect/.htpasswd AuthGroupFile /dev/null AuthName "Password Protected Area" AuthType Basic

Suche

Neueste Kommentare

  • 1 week 4 days ago
    How to Renew Let’s Encrypt SSL Certificate on Plesk via Ubuntu Shell

    Let’s Encrypt will only accept a wildcard via DNS challenge. 

    If your Plesk instance can’t create the _acme-challenge.example.com TXT (external DNS), the extension can’t complete validation and will show no success. 

  • 2 weeks 4 days ago
    Warning: Undefined array key "url" in Drupal\Core\Asset\CssCollectionOptimizerLazy->optimizeGroup()
    Warning: Undefined array key "url" in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup() 
  • 2 weeks 6 days ago
    Server install & config : Debian 12 + Plesk + Apache + nginx + MariaDB + Solr
    sudo timedatectl set-timezone Europe/Berlin
  • 3 weeks 6 days ago
    Warning: PHP Startup: Unable to load dynamic library 'apcu.so' ... cannot open shared object file: No such file or directory

    Try this:

  • 1 month 1 week ago
    List Cronjobs for all users (via for + crontab)

    Alternative (without warnings like "no crontab for dovecot") to see all tasks:

  • 1 month 1 week ago
    Install APCu (PHP 8.1, Plesk)

    php 8.3 apcu failed

    über Plesk hat es geklappt.

     

  • 1 month 1 week ago
    Install APCu (PHP 8.1, Plesk)

     

    install:

    # sudo apt install php-dev
    
  • 1 month 1 week ago
    pecl install apcu : phpize: not found / ERROR: `phpize' failed

    phpize

    # sudo apt install php-dev
    

     

    details

  • 1 month 1 week ago
    Install APCu (PHP 8.1, Plesk)

    Problem:

  • 2 months 3 weeks ago
    Install APCu (PHP 8.1, Plesk)

    Problem: