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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:28:28+00:00 2026-06-11T01:28:28+00:00

I have one .htaccess file in the public_html folder of my server that lets

  • 0

I have one .htaccess file in the public_html folder of my server that lets me keep my primary domain in a subfolder:

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

In that subfolder is another .htaccess with more rewrites to turn urls ending with things like /index.php?page=about into just /about:

RewriteEngine On
RewriteRule ^$ index.php?page=home
RewriteRule portfolio index.php?page=portfolio
RewriteRule resume index.php?page=resume
RewriteRule about index.php?page=about
RewriteRule contact index.php?page=contact

The last four pages work, but my rewrite for just the domain name (\^$) is broken. Everything works on my local MAMP server, but the first .htaccess file is not present there, so I’m thinking that the two are conflicting. Any web dev champs able to see what’s going wrong?

  • 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-11T01:28:30+00:00Added an answer on June 11, 2026 at 1:28 am

    I’m assuming you have a /mrmikeanderson/ folder where the 2nd htaccess file is. The reason why the
    RewriteRule ^$ index.php?page=home
    isn’t being applied is because you are redirecting the / request to mrmikeanderson/index.php. So either change this rule:

    RewriteRule ^(/)?$ mrmikeanderson/index.php [L]        
    

    to

    RewriteRule ^(/)?$ mrmikeanderson/index.php?page=home [L]        
    

    or change this rule in the other htaccess file:

    RewriteRule ^$ index.php?page=home
    

    to

    RewriteRule ^(index.php)$ index.php?page=home
    

    Or you can change your index.php file to assume the variable page is home by default.

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

Sidebar

Related Questions

I would like to have one .htaccess file that can rewrite correctly on both
I have the following directive in my .htaccess file which works on one server,
Good day everyone, I have an HTACCESS file that contains the following: Options +FollowSymlinks
I am using Apache/2.2.17 (Win32) PHP/5.3.0. I have .htaccess file in one of my
I have an htaccess file that uses mod_rewrite to redirect /controller to /index.php?controller=%controller% Like
I have several sites listed in my htaccess file that I want banned but
Here is the code I have currently in my .htaccess file: Options +FollowSymLinks RewriteEngine
I have ONE directory for my entire domain that I want to force https,
have one time consuming step that flattens a bunch of files. basically i'd like
I have this domain.com pointed to /home/username/public_html/domain.com . I added these lines to the

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.