How can I disable the forced redirect to https previously selected?

These are the two sections that force the connections to HTTPS:

You can comment them out using "#" OR just delete them.
And restart the web server.

3 Likes
<VirtualHost * :80>
DocumentRoot /var /www/html
ServerName basasaba.com
ServerAlias www.basasaba.com
#RewriteEngine on
#RewriteCond %{SERVER_NAME}=basasaba.com
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END, NE, R=permanent]
</VirtualHost>

<VirtualHost * :80>
DocumentRoot /var /www/ sample
ServerName sample.basasaba.com
#ServerAlias sample.basasaba.com
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =sample.basasaba.com
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END, NE, R=permanent]
</VirtualHost>

Configured and rebooted as above. The redirection of basasaba.com has been canceled. However, I cannot cancel the redirect of sample.basasaba.com.

Of course, I have cleared the browser cache.

There are other ways to also force HTTPS redirection...
Is there an .htaccess file in the folder /var/www/sample?
Please show:
ls -la /var/www/sample

3 Likes

WordPress can also be used to force HTTPS redirection:

curl -Ii http://sample.basasaba.com/
HTTP/1.1 301 Moved Permanently
Date: Tue, 29 Aug 2023 02:11:12 GMT
Server: Apache/2.4.53 (Rocky Linux) OpenSSL/3.0.7
X-Powered-By: PHP/8.2.9
X-Redirect-By: WordPress <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Location: https://sample.basasaba.com/
Content-Type: text/html; charset=UTF-8
3 Likes

Do you mean that there is such an item in the Wordpress settings?

BEGIN WordPress

"BEGIN WordPress" から"END WordPress"までのディレクティブ(行)は

動的に生成され、WordPress フィルターによってのみ修>

正が可能です。

これらのマーカー間にあるディレクティブへのいかなる>

変更も上書きされてしまいます。

#

#RewriteEngine On

#RewriteRule .* - [E=HTTP_AUTHORIZATION: %{HTTP: Author

ization}]

#RewriteBase /

#RewriteRule ^index.php$ - [L]

#RewriteCond %{REQUEST FILENAME} !-f #RewriteCond %{REQUEST_FILENAME}!-d

#RewriteRule • /index.php [L]

#

END WordPress

I've commented out some .htaccess and rebooted, but the redirect is still there.

I don't use WordPress, but the connection clearly states:
X-Redirect-By: WordPress

4 Likes

thank you. Problem solved. I am very grateful to you guys. Thank you very much.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.