Welcome to Geeklog, Anonymous Tuesday, October 04 2022 @ 06:34 am EDT

Geeklog Forums

.org and .net - same geeklog


New User

Anonymous
My web site has two domains, .org and .net, both of which are pointed to the same public_html directory and are supposed to display exactly the same Geeklog. I noticed that everything works perfectly under the .net installation, but I cannot log in using the .org domain. Banging your head

Is there an easy way to make the site available and functional under both domains (if so, please tell me what files I need to edit and how), or will I be forced to forward all .org requests to the .net domain?

Thank you!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
That won't work due to the cookies (as you already noticed).

Create a .htaccess (assuming you're on an Apache webserver) that contains this:
Text Formatted Code
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.example.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule (.*) http://www.example.com/$1 [L,R]
 

Replace "www.example.com" with the preferred domain for your site.

Now when someone comes in through www.example.org, they are immediately redirected to www.example.com.

bye, Dirk
 Quote

Status: offline

grant

Forum User
Junior
Registered: 12/14/05
Posts: 21
Location:Iowa City, IA
On my local server I use this
Text Formatted Code

$_CONF['site_url']          = 'http://'.$_SERVER["HTTP_HOST"].'/~grant/geeklog';

 


So I can access from ip address or hostname, and so I can always reach it since I have a dynamic IP address.
 Quote

All times are EDT. The time is now 06:34 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content