Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

apache rewrite www to non www

#enable rewrite module with: sudo a2enmod rewrite

#ad this to your VirtualHost config or /.htacess file
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

#restart apache: /etc/init.d/apache2 restart
Comment

PREVIOUS NEXT
Code Example
Shell :: ubuntu enable ssh 
Shell :: homebrew install in linux 
Shell :: github undo last pushed commit 
Shell :: ubuntu command upgrade application 
Shell :: bash: ./runapp.sh: Permission denied 
Shell :: update hour linux 
Shell :: kali linux side menu bar disappeared 
Shell :: linux "Error: Timeout was reached" 
Shell :: ubuntu open with software install not working 
Shell :: git revert a commit 
Shell :: set cmake variable commandline 
Shell :: wc powershell 
Shell :: bash home backup script linux 
Shell :: install jenkins on ubuntu 20.04 
Shell :: Create permanent env variable 
Shell :: how to change port for xampp 
Shell :: chown 
Shell :: Invalid base64-encoded string: number of data characters (221) cannot be 1 more than a multiple of 4 
Shell :: how to install msfconsole in ubuntu 
Shell :: Install Redis GUI on Ubuntu 20.04 
Shell :: git ignore .env 
Shell :: git push existing git repository 
Shell :: how to create a username along with home directory in linux 
Shell :: video trimmer ubuntu 
Shell :: git cherry pick example 
Shell :: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 
Shell :: docker dir log linux 
Shell :: remove file via command line 
Shell :: nginx disable site 
Shell :: video editor for ubuntu 21.10 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =