Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
441 views
in Q2A Core by
hello, first of all sorry for my english.

I have a site:

foro.rmesystems.com

I want when I put:

www.foro.rmesystems.com

redirect me to:

foro.rmesystems.com

How do I do that? Thank you
Q2A version: 1.8.5
by
That depends on what webserver you're running.

1 Answer

0 votes
by
RewriteEngine On

# Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

# Redirect HTTP to HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
...