2016-04-25 6 views
-1

Zuerst möchte ich meine http-Domäne zu https-Domäne und auch von nicht www zu www-Domäne durch .htaccess konvertieren.Wie konvertiert man http zu https

  1. http://quickassignmenthelp.co.uk/https://quickassignmenthelp.co.uk/

  2. https://quickassignmenthelp.co.uk/https://www.quickassignmenthelp.co.uk/

Ich war codiert:

RewriteEngine on 
RewriteCond %{HTTP_HOST} ^quickassignmenthelp\.co.uk$ [NC] 
RewriteRule ^(.*)$ http://www.quickassignmenthelp.co.uk/$1 [R=301,L] 

# BEGIN EXPIRES 
<IfModule mod_expires.c> 
    ExpiresActive On 
    ExpiresDefault "access plus 10 days" 
    ExpiresByType text/css "access plus 1 week" 
    ExpiresByType text/plain "access plus 1 month" 
    ExpiresByType image/gif "access plus 1 month" 
    ExpiresByType image/png "access plus 1 month" 
    ExpiresByType image/jpeg "access plus 1 month" 
    ExpiresByType application/x-javascript "access plus 1 month" 
    ExpiresByType application/javascript "access plus 1 week" 
    ExpiresByType application/x-icon "access plus 1 year" 
</IfModule> 
# END EXPIRES 
+0

Und was funktioniert nicht? – anubhava

Antwort

1

Try this:

RewriteEngine on 
RewriteCond %{HTTP_HOST} ^quickassignmenthelp\.co.uk$ [NC] 
RewriteRule^https://www.quickassignmenthelp.co.uk%{REQUEST_URI} [R=301,L] 

RewriteCond %{HTTPS} off [NC] 
RewriteRule^https://www.quickassignmenthelp.co.uk%{REQUEST_URI} [R=301,L] 

und entfernen Sie die 3 Zeilen vom Anfang Ihres eigenen Codes.

+0

wird es auf https umleiten, aber ein Fehler accours –

+0

bitte überprüfen Sie Domain https://www.quickassignmenthelp.co.uk/ –