Skip to main content

subdomain problem

Comments

3 comments

  • robb3369
    Actually www is not a sub-domain that is added, its a cname record that point to the domain name... I think to address your issue, you can go into cPanel and add a sub-domain with an * (asterisks) so the sub-domain is *.domain.com and points to the /public_html/ directory... Now, in your site's .htaccess file, use something like this: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\.domain\.com RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
    That will redirect the user to
    0
  • ofen
    Thank you so much. It worked!
    0
  • cPanelMichael
    I am happy to see the solution provided was helpful. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.