Make the redirects from http:// to www

When you try to add a new account to webmaster tool, you may face a problem that Google treat a non www link different than (www) .

so you have to do one of the following :

  1. Add the both links ( that is not a good idea for doing that )
  2. Add a code to redirect to ( http://) to (http://www) , and we can do that in .htaccess 

# Redirect www to non-ww
#RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
#RewriteRule ^(.*)$ <a href="http://%251/$1">http://%1/$1</a> [R=301,L]
<span style="line-height: 1.5em;"><ifmodule mod_rewrite.c></span>
RewriteEngine On
# Redirect non-www to www
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ <a href="http://www.%25%7bHTTP_HOST%7d/$1">http://www.%{HTTP_HOST}/$1</a> [R=301,L]


Remove the multisite feature from wordpress ?

Finally you would like to remove the multisite feature from wordpress, as i never used it before, all you have to do is to edit two files

  • config.php
  • .htaccess

// define('WP_ALLOW_MULTISITE', true);
// define( 'MULTISITE', true );
// define( 'SUBDOMAIN_INSTALL', true );
// $base = '/';
// define( 'DOMAIN_CURRENT_SITE', '' );
// define( 'PATH_CURRENT_SITE', '/' );
// define( 'SITE_ID_CURRENT_SITE', 1 );
// define( 'BLOG_ID_CURRENT_SITE', 1 );
/* That's all, stop editing! Happy blogging. */

Comment the above code or remove it

and remove from BEGIN WORDPRESS to END WORDPRESS in .htaccess file


you have to put the default htaccess file

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Create multiple domains for the same hosting WAMP

To make that you have to edit three files  ( Note : this is for windows only ) :

  • hosts file and found under the following path ( C:\Windows\System32\drivers\etc )

put at the end the following line       The_name_of_host(

  • httpd.conf and uncomment the following line 

# Virtual hosts
#Include conf/extra/httpd-vhosts.conf  ( this line )

  • Open the following file httpd-vhosts.conf ( C:\wamp\bin\apache\apache2.4.2\conf\extra ) and add the following lines at the end 

ServerName localhost
DocumentRoot “c:\wamp\www”

ServerName the_name_of_host
DocumentRoot “c:\wamp\www\the_path_to_host”

and check the browser

How to make wamp online across network ?

Today i wanted to make my localhost shared across network so any one can see any edit at my websites

  1. you have to know your ipaddress .. in windows ( as you using wamp ) you run cmd and run ipconfig /all
  2. take your ip4 and this is your ipaddress for your localhost
  3. put WAMP on online mode ( left click on wamp and then press put online )
  4. try this in the browser
  5. it will give you that permssion denied on other computers
  6. you have to edit your http.conf file ( apache )
  7. Edit the following
  8. # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    AllowOverride All
    # Controls who can get stuff from this server.
    # Online --> Require all granted ( you change that to all guranted )
  9. Then try your ip address on other network computers