Hi guys! I want that everyone that type sitename.com to be redirected to www.sitename.com. I already type in my htaccess:
RewriteCond % ^segaconsultores.com.ve[NC]
RewriteRule ^(.*)$ http://www.segaconsultores.com.ve/$1 [L,R=301]
but still nothing is happening. What am I doing wrong? Thanks.
I had fainted, unless I had believed to see the goodness of the LORD in the land of the living.
-
☆ A M B ☆
- 24,524 Posts
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.example-domain-please-change\.com [NC]
RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]
-
☆ A M B ☆
- 3,141 Posts
If it's hosted on MODX Cloud, keep in mind that because it runs nginx, you can't use .htaccess files there. There's a new Manage URL Rewrites function that allows you to enter nginx location blocks. We'll be adding some common examples and instructions for in the Cloud in the
Userguide soon.
Sottwell, sorry that I told something different before but actually what I want to do is that if someone type
www.mysite.com to be redirected to
mysite.com. I tried:
RewriteCond %{HTTP_HOST} ^www.segaconsultores.com.ve [NC]
RewriteRule ^(.*)$ http://segaconsultores.com.ve/$1 [L,R=301]
and some pages look fine and other has no style, but if I select
NO for friendly URL the redirection works fine. Any idea? Thanks.
[ed. note: labanino last edited this post 13 years, 9 months ago.]
I had fainted, unless I had believed to see the goodness of the LORD in the land of the living.
Never mind, I checked back on the friendly URL and everything is working as expected. Thanks.
I had fainted, unless I had believed to see the goodness of the LORD in the land of the living.