.htaccess Isseus

Discussion in 'General' started by Mintu, Apr 4, 2018.

Tags:
  1. Mintu

    Mintu New Member

    Hello,

    I can not solve canonical issues through .htaccess in litespeed web server.
    My website home page are
    Code:
    https://www.printsdiv.com/
    https://printsdiv.com/
    https://www.printsdiv.com/home
    I put this code on .htaccess
    Code:
    RewriteCond %{HTTPS} off
    
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    I would like to keep my main domain
    Code:
    https://printsdiv.com/
    and rest of the domain will be redirected to this domain
    Can you please help me out ? the above code is not working in .htacccess...
    Which code should I work?
     
    Last edited by a moderator: Apr 4, 2018
  2. Pong

    Pong Well-Known Member Staff Member

Share This Page