Redirect HTTPS to HTTP, only 1 page

Hi,

I need to redirect only one page that is HTTPS, for example https://www.mysite.info/sign_in.php to http://www.mysite.info/sign_in.php

I dont have SSL installed, so it always brings up errors.

Anyone got ideas, maybe PHP or htaccess …???

Will a server actually be listening on port 443 without SSL being installed?
And if it is, most browsers nowadays will complain about certificate problems before sending the request to the server, won’t they?

I assume you are running apache and have virtualhosts configured. So -

Edit your /etc/apache2/sites-enabled/example.com

<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin ideamonk@example.com
DocumentRoot /var/www/example.com
</VirtualHost>

<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com
ServerAdmin ideamonk@example.com
DocumentRoot /var/www/example.com
RewriteEngine On
RewriteRule /signup.php http://example.com/signup.php [R]
</VirtualHost>

Notice the bold lines, here we have used Apache’s mod_rewrite to redirect the person to http version of the website only when the visitor tries to navigate to https://example.com/signup.php

If you have similar setup, this should help, otherwise providing more details about your server setup should give us more clues.

If you don’t actually have SSL you won’t be able to do this without any errors being displayed.
The browser will try to create an SSL connection to the server before PHP or htaccess can be used at all.

Maybe you can try to change the link itself?