This is probably a no brainer, but I've not been able to find an answer that is definitive.

I have a Codeigniter site running on Apache with mod_rewrite (to get rid of index.php) and mod_ssl for HTTPS. My question is.....

If at https://example.com/form.php I have a form like this...

<form action="/process.php">

Will that form be submitted to HTTPS, or is it going over HTTP? Do I have to explicitly say HTTPS in the action?


1 Answer 1


If you have a link (or form action) with a relative URI (without a scheme and hostname), then the URI will be completed with the scheme and hostname of the page containing the link.

This means that, if you are on the page "https://example.com/form.php", then the link/action "/process.php" will result in a request for the URI "https://example.com/process.php". Similarly, that link on the page "http://nowhere.example.com/form.php" will go to "http://nowhere.example.com/process.php".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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