Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 01:24 pm EST
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.
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!
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!
5
9
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:
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
Create a .htaccess (assuming you're on an Apache webserver) that contains this:
Text Formatted Code
RewriteEngine OnRewriteCond %{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
9
10
Quote
Status: offline
grant
Forum User
Junior
Registered: 12/14/05
Posts: 21
Location:Iowa City, IA
On my local server I use this
$_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.
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.
9
5
Quote
All times are EST. The time is now 01:24 pm.
- 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