So basically I want everything on my domain (schart.net) to be redirected to alpha.schart.net or schart.net/alpha . For example, if I would enter in “schart.net/something” in the urlbar, it would redirect to “alpha.schart.net/something” or “schart.net/alpha/something”.
Here are a few codes I’ve been using for similar things:
RedirectMatch 301 ^/alpha/(.*)$ http://alpha.schart.net/$1 #Redirects /alpha to alpha
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.schart.net$ [NC]
RewriteRule ^(.*)$ http://schart.net/$1 [R=301,L] #removes www.
What would you use?
– Thank’s :)!