Jump to content

Domain / Site Forwarding


Guest trendyhats

Recommended Posts

Guest trendyhats

I am in the process of having all my web traffic transferred to a new site that I have created. Does anyone know if there is a way to transfer all pages of the site to the new site (new domain)? I know how to foward individual pages but I have thousands of pages and wanted to see if there is a way so that any www.yourdomain.com/xxxx will automatically forward to the new site? Any advice would be great. Thanks

Link to comment
Share on other sites

The best was to do this is in .htaccess

If you don't have the SEO mod, you *may* need to create this file - its simply a text file named .htacesss

I use the following to keep my domain "correct"... ie no WWW prefix.

RewriteEngine On



# Ensure the site is used with without www.

RewriteCond %{HTTP_HOST} ^www\.gear4mobiles\.co.uk$ [NC]

RewriteRule ^(.*)$ http://gear4mobiles.co.uk/$1 [R=301,L]

This will change www.domain.xyz\bla\apage.php to domain.xyz\bla\apage.php (ie remove the www)

If this is what you need, just replace my domain with your ones in the code above.

Jason

Link to comment
Share on other sites

Guest trendyhats

The best was to do this is in .htaccess

If you don't have the SEO mod, you *may* need to create this file - its simply a text file named .htacesss

I use the following to keep my domain "correct"... ie no WWW prefix.

RewriteEngine On



# Ensure the site is used with without www.

RewriteCond %{HTTP_HOST} ^www\.gear4mobiles\.co.uk$ [NC]

RewriteRule ^(.*)$ http://gear4mobiles.co.uk/$1 [R=301,L]

This will change www.domain.xyz\bla\apage.php to domain.xyz\bla\apage.php (ie remove the www)

If this is what you need, just replace my domain with your ones in the code above.

Jason

Thanks. So the first line with an http is the original domain and the second is the domain its forwarded to?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...