marți, 20 septembrie 2011

Web page redirect 301 or others in Apache webserver

First you need to activate .htaccess file that it is or you created in your web pages directory. To activate it open httpd.conf and add:
<Directory "C:/Apache/htdocs/yoursitedirectory">
AllowOverride All
</Directory>
If you have another path to your web pages directory put it instead.

Then you can do redirect from .htaccess file with:
Redirect 301 /old-page-1.html http://www.newdomain.com/new-page-1.html
I found out this after reading many pages where they told me just to how to make the .htaccess file and what to put in it but only here i found out that i need to allow the execution of .htaccess file. It is Method 5 on the web page.  http://www.yolinux.com/TUTORIALS/ApacheRedirect.html