I want to know if it is possible via htaccess to rewrite my URL
My Apache server has only one virtualhost on port 5553, with SSL on.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
Running http and https on the same port won't work. Although the client will know whether it's speaking SSL or not, Apache will expect one or the other and will not detect which one is being spoken by the client.
This will result in HTTP 400 response codes in response to whichever one Apache was not expecting.
If you put them on different ports and use a separate vhost for the SSL and non-SSL requests, it certainly is possible to respond to http requests with a redirect response telling the client to make a new https request. It will not be possible to rewrite an http request into an https request.