Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8036703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:42:22+00:00 2026-06-05T02:42:22+00:00

I asked a question about this yesterday but I am still having trouble with

  • 0

I asked a question about this yesterday but I am still having trouble with my httpd.conf.

What I would like to happen is this:

  • User requests http://www.mysite.com/ or mysite.com, etc. They are then redirected to https://www.mysite.com/shop/

  • I would also like to make sure that any request under the /shop subdirectory is rewritten to HTTPS as well, even if the user types in http://www.mysite.com/shop/help/ it would be rewritten as https://www.mysite.com/shop/help/

Here is my configuration right now, which isn’t working.

Listen *:443 https
Listen *:80 http

<VirtualHost *:80>
    RewriteEngine on
    ReWriteCond %{SERVER_PORT} !^443$
    RewriteRule ^(shop/.*)$ https://%{HTTP_HOST}/shop/$1 [NC,R=301]
    RewriteRule ^/$ https://%{HTTP_HOST}/shop/ [NC,R=301,L]
</VirtualHost>

<VirtualHost *:443>
    SSLEngine On
    SSLAppName QIBM_HTTP_SERVER_ZENDSVR
    SetEnv HTTPS_PORT 443
    RewriteEngine on
    RewriteRule ^/$ https://%{HTTP_HOST}/shop/ [NC,R=301]
</VirtualHost>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:42:23+00:00Added an answer on June 5, 2026 at 2:42 am

    First, make sure mod_rewrite kicks in when your server receives a request. For example, to redirect all requests from your HTTP host to your HTTPS server

    <VirtualHost *:80>
        RewriteEngine on
        RewriteRule .* https://%{HTTP_HOST}/shop/ [R,L]
    </VirtualHost>
    

    Then try

    <VirtualHost *:80>
        RewriteEngine on
        RewriteRule ^/?shop/(.*) https://%{HTTP_HOST}/shop/$1 [NC,R=301,L]
        RewriteRule ^/?$ https://%{HTTP_HOST}/shop/ [R=301,L]
    
        # other directives
    </VirtualHost>
    
    <VirtualHost *:443>
        RewriteEngine on
        RewriteRule ^/?$ https://%{HTTP_HOST}/shop/ [R=301,L]
    
        # other directives
    </VirtualHost>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yesterday my friend asked me a question about this query: select * from user
I already asked a question about this yesterday, but now I have another :)
I asked a question yesterday about a little app that I would like to
I asked a question about different testing frameworks yesterday. This question can be found
Yesterday I asked this general question about decimals and their internal precisions. Here is
Note: I originally asked this question about an hour ago but only recently realized
I asked a question about Garbage Collection in Java in this topic . But
This is probably a long shot but I asked a question about converting one
I asked a question about this previously but my database structure has changed, and
I've already asked a question about this, yet I'm still confused. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.