Determine website’s address dynamically
-
hi there,
I have several domain names that all point to the same server and website, the reason I must have these domain names is that some governments filter my website and by making lots of domains they will have trouble filtering it.
One issue that I have with wordpress is that it saves the address of the website on which it was installed. for example if you install it on https://mydomain1.com/wordperss , it will remember “mydomain1.com”, and if you add another domain to your server, when you are browsing that second domain such as https://mydomain2.com/wordperss all the links on the page will still point to the first domain e.g. https://mydomain1.com/wordperss
that will the whole website invisible for people who are behind governmental firewalls.
In wordpress 2.0 I had solved this issue, I found a php file in wp-includes, that was responsible for returning the saved address of the server, I edited it and made it use the current address from which word press is being browsed from.
But since it was long time ago , I have forgotten where that function or variable was.
Now I have two requests,
1- Can you please let me know from which php file does word press get the url (domain name) from?2- I don’t see any reason why you should make word press remember what domain it was originally installed on, many other applications get the url of the website from where it is being browsed instantly, may be you should not do that in future releases.
Thanks
- The topic ‘Determine website’s address dynamically’ is closed to new replies.