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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:01:37+00:00 2026-06-14T20:01:37+00:00

Ok So i have come across a problem with my htaccess and how to

  • 0

Ok So i have come across a problem with my htaccess and how to get it to work.

I have just purchased a ssl wildcard for my primary and sub domains.
I am with bluehost and they suggest adding this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.example.com$
RewriteCond %{REQUEST_URI} !^/subfolder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subdomain/$1
RewriteCond %{HTTP_HOST} ^subdomain.example.com$
RewriteRule ^(/)?$ subfolder/index.php [L]

At the moment all i have is this…

RewriteEngine On

RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ https://www.domain.com/$1 [L]

RewriteCond %{HTTP_HOST} ^sub.domain.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . sub_folder/index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /index.php [L]

and that works however, i cannot get it so that when i open the file, it just opens the file with no redirects…
So If i open sub.domain.com/file/fil1.js it will open the index.php which is what i do not want…

but if i do /browse or something like that it works…

  • 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-14T20:01:39+00:00Added an answer on June 14, 2026 at 8:01 pm

    Ok after much mucking around and playing around it was the file request which wasnt including the subdomain folder, which was causing it to not find the file location. So I managed to do a manual check for the file, and this is what i got. This seems to do exactly what i want. Im not sure if there is a more efficient way, but this is what it got.

    #-------------------SUB.DOMAIN.COM---------------------
    RewriteCond %{HTTP_HOST} ^sub.domain.com
    RewriteCond %{DOCUMENT_ROOT}/sub_folder%{REQUEST_URI} -f
    RewriteRule . %{DOCUMENT_ROOT}/sub_folder%{REQUEST_URI} [L]
    
    RewriteCond %{HTTP_HOST} ^sub.domain.com
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule . sub_folder/index.php [L]
    #--------------------------------------------------------------
    

    instead of

    RewriteCond %{HTTP_HOST} ^sub.domain.com
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule . sub_folder/index.php [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using $SUB for the first time and have come across this problem.
I have come across a strange problem which I would like to get your
I have come across a problem I just can't solve. I am using autocomplete
I am just getting into MEF and I have come across a problem that
I have come across a problem. There are N piles of stones where the
I am new to sql and I have come across a problem on joining
I've started learning JSF2.0, and have come across a problem. Any advice on how
I have come across an annoying problem. I have made a system and now
I have come across an annoying problem while writing some PHP4 code. I renamed
I have come across quite a wired problem right now. I am using ASP.NET

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.