Welcome Guest, Not a member yet? Register   Sign In
How to create a dynamic base url
#1

My domain - domain.com
A link on this domain is - domain.com/page

Now I want to access this page from other subdomains like-
sub1.domain.com/page
sub2.domain.com/page
sub3.domain.com/page
...
...
subn.domain.com/page

What is the best way to do this...?

Thank you in advance
Reply
#2

If you want to access the same domain which is currently in use, you simply create your links using one of the URL helper functions, like:
Code:
<a href="<?php echo site_url('page'); ?>">Link to {current_domain}/page</a>
Reply




Theme © iAndrew 2016 - Forum software by © MyBB