15 articles Servers Page 2 / 2

Quick guide for .htaccess redirects

Redirect HTTPS traffic to HTTP: RewriteEngine On RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Redirect HTTP traffic to HTTPS: RewriteEngine OnRewriteCond %{HTTPS} offRewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] Redirect both HTTPS and HTTP to HTTPS without www: RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www. [NC] RewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC] RewriteRule ^(.*)$ https://google.com/$1 [R=301,L] Redirect both HTTPS and…

Mounting a Software Raid drive attached with USB in Linux rescue

1). Remake the raid mount points: 2). mount /dev/md10 /mnt/backup 3). Check for the USB volumes: vgdisplay lvscan 4). Use the UUID to rename the volume: vgrename TdDMzM-Q05M-MLaO-ylQb-tBkn-Xqpo-jgQ5vX usb1 5). Activate it:vgchange -a y usb1 6). Mount everything on /dev/usb1 like normal:mount /dev/usb1/home /mnt/backup/homemount /dev/usb1/usr /mnt/backup/usrmount /dev/usb1/var /mnt/backup/var