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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:48:49+00:00 2026-06-11T10:48:49+00:00

I have developed a PHP webshop project which works independently for each customer. Meaning

  • 0

I have developed a PHP webshop project which works independently for each customer. Meaning each customer installs own webshop source files, php.

I found out that this is a killer to maintain many websites so I decided to place the source files of the webshop in a common place in the server and create an alias on the apache server so all www customers have access to it.

Then each customer has own config file, log folder, template folder etc. in their own www folders.

I managed to do all of the stuff above. But my problem is the URL.

URLs will look as follows:
http://www.exampleshop.com/webshop/v1/index.php

I need to hide the webshop/v1 in the url so it looks as follows:
http://www.exampleshop.com/index.php

I played with url rewrite mod but it keeps telling that the index.php does not exist as it does look for the file in the root of exampleshop.com which is not correct, it is in /webshop/v1

Any ideas? alternatives.

Hope someone can help 🙂


I managed to do the above with the followings 🙂

RewriteEngine On
#for admin pages redirection
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$/admin/index\.php$ /webshop/v1/admin/$1 [L]

#for webshop pages redirection
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /webshop/v1/$1 [L]

the aboves works, but the only problem is that it does not recognize the index file.
when I go to url without specifying a page it doesn’t work as index file wont work. I have to type full url such as webshop.com/index.php to get it to work.

and is there a way to remove the extension too 🙂

Solutions which works also without specifying index.php in url

#if no file specified, forward to index
RewriteRule ^$   webshop/v1/   [L]
#if no file specified, forward to index
RewriteRule ^admin/$   webshop/v1/admin/   [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /webshop/v1/$1 [L]
  • 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-11T10:48:50+00:00Added an answer on June 11, 2026 at 10:48 am

    I’d route the requests a application-level based on the host.

    Say you have the files installed on your server, and various domains pointing at this server, i.e. customer1.com, customer2.com, customer3.com etc. Then, in your index.php file, just detect which domain the files are being accessed from and switch configuration settings as required.

    You could have a database table that maps settings to domains, so you can do a database query and fetch settings if you didn’t want to use file-based configuration.

    UPDATE

    Well, in that case, you want a .htaccess rule. Please this in your root .htaccess:

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteRule ^$   webshop/v1/   [L]
        RewriteRule (.*) webshop/v1/$1 [L]
    </IfModule>
    

    And this in your /webshop/v1/ directory:

    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        # for admin pages redirection
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^admin/(.*)$ /webshop/v1/admin/$1 [L]
    
        # for webshop pages redirection
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /webshop/v1/$1 [L]
    </IfModule>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a PHP-MySQL web application, which is a school-based project. My client
I have developed a small download system in PHP, where files are downloaded through
I have one project with is developed in Php and javascript. How to open
I have a PHP-script originally developed on Ubuntu, which now has to run on
We have a small company and we have developed our own CMS in PHP/MySQL.
I have developed an online leave management system in PHP, MySQL, which is working
I have a web application developed in php which supports functionalities such login/signup post
I have developed a program in PHP which opens IE on a button click.
I have developed a PHP project. In this I want to implement the font
I have developed a PHP application that processes relatively large text files, and stores

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.