1

When I visit ?q=admin/config/search/clean-urls via HTTP I am able to enable clean URLs and they work fine.

However, when I visit the same path via HTTPS I am not able to enable clean URLs and get this error:

enter image description here

Here is my apache conf file for http:

NameVirtualHost *:80

<VirtualHost *:80>

    UseCanonicalName Off
    ServerAdmin webmaster@localhost
    DocumentRoot /media/www_drive/drupal7

  <Directory /media/www_drive/drupal7>
    Require all granted
    AllowOverride All
  </Directory>

</VirtualHost>

Here is my apache conf file for https

NameVirtualHost *:443
<VirtualHost *:443>

    SSLEngine on
    SSLCertificateFile /etc/ssl/cgps/star.cgps.org.crt
    SSLCertificateKeyFile /etc/ssl/cgps/np_cgps.key
    ServerAdmin webmaster@cgps.org
    DocumentRoot /media/www_drive/drupal7
    SSLCACertificateFile /etc/ssl/cgps/RapidSSL.crt

    <Directory /media/www_drive/drupal7>
      Require all granted
      AllowOverride All
    </Directory>

</VirtualHost>

Shouldn't this config use the same .htacess file in the drupal root for both HTTP and HTTPS? What could cause clean URLs to fail to pass the check via HTTPS?

0

You can try below with changing in .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off   
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.