I want to load index.php
by default BUT if there is call
or call.php
in url it should load call.php file instead:
Default URL (below URLs should load ROOT/index.php):
http://example.com/rgt-cfjv-vlm
http://example.com/index.php/rgt-cfjv-vlm
Other URL (below URLs should load ROOT/call.php):
http://example.com/call/rgt-cfjv-vlm
http://example.com/call.php/rgt-cfjv-vlm
NOTE “rgt-cfjv-vlm” is a random string and it will always come in URL
Any help will be appreciated! Thanks.
2
Answers
Workaround: I have changed my directory structure as below:
For Default URL (http://example.com/rgt-cfjv-vlm):
ROOT/.htaccess
For Other URL (http://example.com/call/rgt-cfjv-vlm):
ROOT/call/.htaccess
Now its loading ROOT/index.php on
http://example.com/rgt-cfjv-vlm
and ROOT/call/index.php onhttp://example.com/call/rgt-cfjv-vlm
.I believe there will be some better solution but using it on temporary bases.
here you go: