View Redirect m. to www (dedicated mobile to desktop)
# Esempio 1
RewriteCond %{HTTP_HOST} ^m\.esempio\.com$
RewriteRule ^\*$ http://www.esempio.com/*? [L,R=301]
# Esempio 2
RewriteCond %{HTTP_HOST} ^m\.esempio\.com$ [NC]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^\*$ http://www.esempio.com/*? [R=301,NE,NC,L]
# Esempio 3
View Keep-Alive Apache config file
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
View Keep-Alive .htaccess
<ifModule mod_headers.c> Header set Connection keep-alive </ifModule>
View Magento Robots.txt
User-agent: *
Disallow: /admin/
Disallow: *price=*
Disallow: *dir=*
Disallow: *order=*
Disallow: *limit=*
Disallow: */catalog/*
Disallow: */catalogsearch/*
Disallow: */customer/*
View Rel Next Rel Prev
<Link rel = "next" href = "http://esempio.it/clothing?p=6" />
<Link rel = "prev" href = "http://esempio.it/clothing?p=4" />
View Magento Categories Rel Canonical
<reference name=”head”>
<action method=”addLinkRel”>
<rel>canonical</rel>
<href>http://yourwebsiteadress.co.uk/page-name.html</href>
</action>
</reference>
View Magento in subfolder - .htaccess remove index.php
RewriteBase /magento/ RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /magento/index.php HTTP/
RewriteRule ^index.php$ http://www.esempio.it/magento/ [R=301,L]
View Magento .htaccess remove index.php
RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/
RewriteRule ^index.php$ http://www.esempio.it/ [R=301,L]
View Nginx Directory Password Protection
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
server_name localhost;
location / {
View Apache Directory Password Protection
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/html">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/apache2/.htpasswd