Rewrite www to non-www - directory other than root

Discuss Search Engine Optimization in relation to Joomla!. This forum will also have discussions on SEF/SEO Joomla! extensions.

Moderator: General Support Moderators

User avatar
jaman_vvip
Joomla! Intern
Joomla! Intern
Posts: 59
Joined: Fri Aug 29, 2014 2:13 pm
Location: Bangladesh
Contact:

Re: Rewrite www to non-www - directory other than root

Postby jaman_vvip » Wed Dec 03, 2014 5:00 pm

its works for me, thanks

idfajar
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Nov 25, 2014 10:29 am

Re: Rewrite www to non-www - directory other than root

Postby idfajar » Mon Dec 08, 2014 9:27 am

Thank you i've try this code and it works for me.

Finally, use this code for the www to non-www redirection:

Code: Select all

RewriteCond %{HTTP_HOST} !^(example\.com)?$
RewriteRule (.*) http://example.com/$1 [R=301,L]
Every character in that code, and especially the ! ^ ( ) ? and $ are important.[/quote]



---------------------------------------------------------------------
Hosting Terbaik - https://www.niagahoster.co.id
Paket pembuatan web profesional - http://www.niagaweb.co.id/harga-pembuatan-website/

sivasankari
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Dec 08, 2014 4:06 pm

Re: Rewrite www to non-www - directory other than root

Postby sivasankari » Mon Dec 08, 2014 4:25 pm

RewriteCond %{http_host}!^(www.neerajasri.net)?$
RewriteRule(.*)http://www.neerajasri.net/$1{r=301,l]

fptquangngai
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Sun Jan 11, 2015 10:13 am
Location: tech
Contact:

Re: Rewrite www to non-www - directory other than root

Postby fptquangngai » Sat Jan 24, 2015 9:39 am

Follow me, to optimize your website should be used only 1 url is no-www.
Google see 2 address and no-www and www is 2 different addresses.
can occur Errors when the index duplicate content in 2 addresses.
you can use .htaccess file and redirect the only one address.
site specializing in technology: http://fptquangngaionline.net/
chào mừng đến với cộng đồng:http://www.internetvietnam.net/


Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 1.5”

Who is online

Users browsing this forum: Google [Bot] and 7 guests