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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:47:32+00:00 2026-05-15T08:47:32+00:00

I have 8 domainnames that point to the same www-root. If the main domain

  • 0

I have 8 domainnames that point to the same www-root. If the main domain is accessed, you are pointed to index.php, and from there on, the URL’s are like: index.php?p=contact etc. If, however, you access one of the other 7 domains, that point to different units, you are initially pointed to: index_local.php, and from there on it goes like: index_local.php?p=contact etc.

As you may see these URL’s are very ugly, can I use mod_rewrite in this scenario to make it so that index.php AND index_local.php never show up in URL? Is there any better way to do this than the way I’m pointing the user now with multiple domains in the same www-root?

  • 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-05-15T08:47:32+00:00Added an answer on May 15, 2026 at 8:47 am

    Something like this should help hide the index* URLs:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    
    RewriteCond    %{HTTP_HOST}    ^domainname1.com
    RewriteRule    ^/(.*)$    index.php?p=$1 [L]
    
    RewriteRule    ^/(.*)$    index_local.php?p=$1 [L]
    </IfModule>
    

    There are other ways to do this cleanly, if your willing to change some code, but this should work with the code you have.

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

Sidebar

Related Questions

If I have 2 domain names that point to same website (for example: microsoft.com
I have written a PHP script that checks whether a domain is available for
I need to have 2 domain names that will basically be the same application
I have two different domains (let's say www.site1.com and www.site2.com) that point to the
How to get all emails, from text, that have these domain names [@yahoo.com, @google.com,
Let's say I have a list of domain names that I would like to
I have two domain names pointing to the same ip, I am currently not
I have a registration form that on submit, validates passwords and domain names that
i have got below rule that works fine with standart domain names like .net.com,.mobi
I have a website, available through multiple domainnames. like www.domain1.com .... www.domain5.com All my

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.