Multiple index.php pages on website for multiple locations?

FerdieQO

Well-known member
Joined
Jul 15, 2016
Messages
200
Best answers
0
Ratings
24
Points
18
#1
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
 
Joined
Jan 1, 2019
Messages
56
Best answers
0
Ratings
22
Points
8
#2
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
Joined
Mar 1, 2018
Messages
102
Best answers
0
Ratings
8 1
Points
18
#3
Joined
Apr 18, 2017
Messages
46
Best answers
1
Ratings
14 1
Points
8
#7

FerdieQO

Well-known member
Joined
Jul 15, 2016
Messages
200
Best answers
0
Ratings
24
Points
18
#9
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

New member
Joined
Jul 5, 2018
Messages
12
Best answers
0
Ratings
4
Points
3
#11
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
2
  • Deleted
  • Deleted by fwh
Replies
0
Views
1
Replies
0
Views
1
Replies
1
Views
21
  • Deleted
  • Deleted by fwh
Replies
0
Views
1

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

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