Multiple index.php pages on website for multiple locations?

FerdieQO

Well-known member
Joined
Jul 15, 2016
Messages
213
Points
28
Hello,

Is it possible to create multiple index.php pages on website for multiple locations?

I want to create one like this

example.com/index.php --> when CA visitors visit, this index.php file will be used for CA visitors
example.com/index.php --> when US visitors visit, this index.php file will be used for US visitors

2 these index.php files are quite different
 

anilkvm85

Member
Registered
Joined
Jan 1, 2019
Messages
56
Points
8
For particular one website, you can't place 2 index files.

Can you place 2 files with same name in same folder? If not then how can you do it with your website.
Your website points to a folder in your web hosting account where you store all your relevant files.

You can not place index.php like below.

example.com/index.php
example.com/index.php

You can place index.php on two different websites.

example.com/index.php
example2.com/index.php

Even you can do one more thing to achieve your desired results.

Create a folder under your website's folder like "us" and install wordpress manually, if you are using WordPress. And put your index.php in that folder. Then your first website would be like:

example.com/index.php

and second one would be like:

example.com/us/index.php


I have implemented the same with one of my websites.
Even you can find this example with the blogs who have started their forum website. They do the same thing.

example.com
example.com/forum

In this case their index files are in different folders.
 

cheapestwebhosting

Well-known member
Registered
Joined
Mar 1, 2018
Messages
102
Points
18

Veesp

Member
Registered
Joined
Apr 18, 2017
Messages
47
Points
8

FerdieQO

Well-known member
Joined
Jul 15, 2016
Messages
213
Points
28
FerdieQO
it is not difficult to do this way but I am looking for a way to merge/run 2 cms into a root folder (public_html). I am wanting to put both Wordpress and vBulletin in public_folder but they are running functions via index.php
 

WSCallum

Member
Hosting Provider
Registered
Joined
Jul 5, 2018
Messages
43
Points
8
Wouldn't be possible to run two different index files in the same folder.

You'll need to either use subdomains or further folders so either
us.example.com
or example.com/us
 
Latest Threads
Replies
0
Views
42
Replies
0
Views
30
Replies
0
Views
168
Replies
0
Views
75
Replies
0
Views
68
Recommended Threads
Replies
2
Views
18,338
Replies
0
Views
1,178
Replies
41
Views
14,231
Replies
3
Views
2,575

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top