Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

297
Views
redirect http to https with port (using .htaccess only)

I need to redirect all traffic from:

http://mywebsite.com:8002

TO

https://mywebsite.com:8002

using only .htaccess

is this possible?


Notes:

  • my webhost doesn't allow changes to proxy, so htaccess is my only hope
  • my http >> https rule works but not with port added

--

here is my current .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;"

RewriteRule ^clubsimulator$ https://www.mywebsite.com:8002 [R=301,L]

ErrorDocument 404 https://www.mywebsite.com/404
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!