SEO Mod rewrite non-www to www

Asked by VPP

How can I do SEO mod_rewrite from non-www to www without affecting the rest?

Exemple:
RewriteEngine On

RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
Jisko Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Marcos Garcia (marcosgdf) said :
#1

Don't know :(

Maybe you can just add "www." to $globals['base'] and DOMAIN in the
config.php file

2009/10/28 VPP <email address hidden>

> New question #87174 on Jisko:
> https://answers.launchpad.net/jisko/+question/87174
>
> How can I do SEO mod_rewrite from non-www to www without affecting the
> rest?
>
> Exemple:
> RewriteEngine On
>
> RewriteCond %{HTTP_HOST} ^domain.com [NC]
> RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
>
> Thanks
>
> --
> You received this question notification because you are an answer
> contact for Jisko.
>

--
marcos garcía // marquitox (.net)

Revision history for this message
MR HSNNN (lastreaction) said :
#2

To implement an SEO mod_rewrite from non-www to www without impacting other rewrite rules, you can utilize Apache's mod_rewrite module. By incorporating the following code into your .htaccess file, you can ensure that requests to the non-www version of your domain are redirected to the www version: You can ask any seo agency regarding this as well such as https://converted.co.uk/

Can you help with this problem?

Provide an answer of your own, or ask VPP for more information if necessary.

To post a message you must log in.