- Moderated by:
- Support
-
- rank:
-
Helper
- registered:
- June 2003
- Status:
- offline
- last visit:
- 01.02.06
- Posts:
- 111
EDIT: Sorry, just realized I posted in wrong forum...please move to Support or where appropriate.
I would like to know if this is remotely possible. I am building a site of which I have both .net and .com domains. I would like to ba able to use only one PN site for both publc and private use. In other words. If you go to www.mysite.com, you do not see a login block. But, if you go to www.mysite.net, you get to the same site but with a login block. Is this possible in any way? Would be great if so. Does this make sense...would not have to maintain two different sites (one for public and one for employee).
Thanks in advance for any help or suggestions. -
- rank:
-
Professional
- registered:
- December 1969
- Status:
- offline
- last visit:
- 30.12.05
- Posts:
- 1310
Or you could customize the login blocks (or whatever it is) to pay attention to the site domain and not display if it's mysite.com and display if it's mysite.net.
So, it's more than remotely possible. Just take some custom PHP code... -
- rank:
-
Helper
- registered:
- June 2003
- Status:
- offline
- last visit:
- 01.02.06
- Posts:
- 111
Thanks for the reply. Can someone give me an example of how I would manipulate the login.php code to look for the domain source. I am not much of a PHP coder but I am starting to learn.
Thanks for your help! -
- rank:
-
Professional
- registered:
- December 1969
- Status:
- offline
- last visit:
- 30.12.05
- Posts:
- 1310
It's a more complicate project than what I would want to help someone to learn PHP with.
If you're really interested, start with the login.php file in the includes/blocks directory. This is the code that displays the login block in the left (or right) column. -
- rank:
-
Helper
- registered:
- June 2003
- Status:
- offline
- last visit:
- 01.02.06
- Posts:
- 111
I understand you (ColdRolledSteel) don't want to get involved in any major projects. I didn't think this would be that major, as I have seen some PHP code quite some time ago that looked at what was in the address URL. I don't recall where it was, but I do recall it not being that extensive. Nonetheless, I understand you not wanting to help. But, does anyone else want to assist me with this....it is pretty important that I have this function and I would be eternally greatful.
Thanks -
- rank:
-
Freshman
- registered:
- May 2003
- Status:
- offline
- last visit:
- 31.05.04
- Posts:
- 5
If you are wanting to display the block based on what the user types in the address you could try the _SERVER["SERVER_NAME"] value.
You might be able to get what you need from the _SERVER["HTTP_FORWARDED"]
http://www.webhostin…hread/190002-1.html has a great discussion that you could use some of the code for this.
