need to permanently redirect my webpage

Moredhel said:
Thats a nasty way that can potentially break the back button if misused. The best way is to use mod_rewrite

Make a file called .htaccess in the root of the first site and put this in it:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.newdomain.com$1 [R=301,L]
</IfModule>

ok i get the following error:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

the .htaccess file i have used is

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.theaccountancyforums\.com$ [NC] RewriteRule ^(.*)$ http://www.theaccountancyforums.com/forums$1 [R=301,L]</IfModule>

any ideas :(
 
Back
Top Bottom