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 8402499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:05:10+00:00 2026-06-09T22:05:10+00:00

I have searched and while I found lots of threads close, none were exactly

  • 0

I have searched and while I found lots of threads close, none were exactly what I am looking for…

On my site, say example.com, I’ve created the subdomain secure.example.com

This subdomain will have SSL.

What I want to do is redirect requests to https://secure.example.com/path/ to http://www.example.com/path/ while keeping the url showing as https://secure.example.com/path/

note that the purpose of subdomain.example.com is for SSL so the redirect above will need to work with SSL

I would like to use a few other redirects in the htaccess:
1) redirect non-www to www ignoring subdomains (so secure.example.com doesn’t become http://www.secure.example.com)
2) redirect /index.php to /
3) and last but not least, force SSL on secure.example.com

In addition the shopping cart software has additional htaccess statements for functionality and SEO as seen below.

My current root htaccess:

# Prevent Directoy listing 
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
 Order deny,allow
 Deny from all
</FilesMatch>

# Turn Rewrite Engine On
RewriteEngine On

## index.php to root
Options +FollowSymlinks
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.example.com/ [R=301,L] 

## non-www to www ignore subdomains
RewriteCond %{HTTP_HOST} ^example.com [NC] 
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
  • 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-09T22:05:11+00:00Added an answer on June 9, 2026 at 10:05 pm

    Well, specifically for the url https://secure.example.com/path/ to display content found at http://www.example.com/path/, there’s 2 things that you can do. The best thing is if the 2 domains are served from the same document root:

    they are on the same host and same document root. The subdomain is literally a subfolder under the root setup with a subdomain. With help from my host we now have it resolving properly and the SSL installed.

    The subdirectory might be a problem, since it may not be able to rewrite out of its own document root. For example:

    • domain -> document root
    • http://www.example.com -> /path/to/htdocs
    • secure.example.com -> /path/to/htdocs/secure

    If you had an .htaccess file in /path/to/htdocs/secure to rewrite requests for https://secure.example.com/. The problem here is you need to rewrite to the parent directory, and apache won’t let you do that. If it was the other way around, you could rewrite requests for http://www.example.com/ to /secure. Also, if the two domains had the same document root, you could also rewrite. But not if secure is a subdirectory to www’s document root.

    My host says that mod_proxy is installed. My Apache config shows these are installed: proxy_module (static) proxy_connect_module (static) proxy_ftp_module (static) proxy_http_module (static) proxy_ajp_module (static) proxy_balancer_module (static)

    That means you can at least use the P rewrite flag to send the request off to mod_proxy, so you can do something like this:

    RewriteEngine On
    RewriteRule ^path/$ http://www.example.com/path/ [L,P]
    

    in the htaccess file in your secure.example.com’s document root. That will only proxy specifically the URI /path/, and not anything like /path/foo/bar.html. If you want everything starting with /path/, then you can match against it:

    RewriteRule ^path/(.*)$ http://www.example.com/path/$1 [L,P]
    

    If there are redirection issues, you may want to resort to using ProxyPass instead:

    ProxyPass / http://www.example.com/
    ProxyPassReverse / http://www.example.com/
    

    It does the same thing except it rewrites location headers so redirects also get proxied.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched but not found exactly what I was looking for. I have
I have searched on google and stackoverflow for a while, but didn't really found
I have searched the internet now for quite a while and found several bits
I've searched this for a while and haven't found anything answered anywhere: I have
I've searched for this for quite a while and haven't found a clear example
I have searched for a while, to know which screen resolution i should consider
I have searched for this, and i found that for api less than 12,
I have searched a lot and couldn't found the approach to create the small
I searched a while and found no solution or do I just not see
I've searched for a while but I've only found the Facebook UI, that has

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.