Problem With https Redirect in .htaccess Running Netbeans with XAMPP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem With https Redirect in .htaccess Running Netbeans with XAMPP

OldGeek
Hello,

I'm new to Netbeans. Love it so far, but I have one vexing problem. I use some code in .htaccess to redirect visitors to https:


Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ <a href="https://%">https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]



which works fine in production. But it seems to confuse Netbeans, XAMPP, or both. It causes a 404 if I run a file, and it causes the XAMPP home page to come up if I try to access localhost.

I've been working around it by commenting out the lines or renaming the .htaccess file for testing, but I'm an old fart and I don't want to forget to change it back when I'm done. Before I go messing around trying to install SSL in XAMPP, I thought I'd ask here how to go about fixing this problem.

Thanks,

Richard




Reply | Threaded
Open this post in threaded view
|

Problem With https Redirect in .htaccess Running Netbeans with XAMPP

OldGeek
Never mind. A little research revealed that XAMPP includes a tool to create a local cert, appropriately enough named makecert.bat, and happily waiting in C:\\xampp\apache to be called into duty.

Very clever, those XAMPP folks.

I ran the batch file and created the virtual hosts, and voila, https works.

Thanks anyway. I'll be back.