Jump to content


Photo

how to disable www-subdomain


  • Please log in to reply
4 replies to this topic

#1 zam

zam
  • Members
  • Pip
  • Newbie
  • 3 posts

Posted 09 October 2003 - 10:19 AM

I\'ve rented space in apache@w2k so I have\'t all permissions there.. .htaccess I have and i\'ve tried to make it with it but no luck yet. So is there any guru\'s around to answer is it possible. With htaccess both www.domain.org and domain.org goes to same file (index.php) even if I have made it (with www.) to redirect elsewhere.

#2 LAMP

LAMP
  • Members
  • PipPip
  • Member
  • 21 posts
  • LocationMissouri, USA

Posted 22 October 2003 - 06:06 AM

So, is this a name-based virthost issue?

How about testing the server name?
[php:1:eb29da226a]<?php
if ($_SERVER[\'SERVER_NAME\']==\"www.mydomain.com\") {
include \'somepage.php\';
} else {
include \'someotherpage.php\'; // or header(\"Location: ) etc.....
}
?>[/php:1:eb29da226a]
Hope this sheds some light, [br]LAMP [br]******************************* [br]Warning: main(): Failed opening \'sig.php\' for inclusion (include_path=\'.:/usr/local/share/pear\') in /usr/local/www/data/phpfreaks/forums/topic.php on line 435

#3 zam

zam
  • Members
  • Pip
  • Newbie
  • 3 posts

Posted 22 October 2003 - 06:35 AM

hih, Luxo Junior :D

well, I think I can make something with that, thanks :)

#4 LAMP

LAMP
  • Members
  • PipPip
  • Member
  • 21 posts
  • LocationMissouri, USA

Posted 22 October 2003 - 06:44 AM

8)
Hope this sheds some light, [br]LAMP [br]******************************* [br]Warning: main(): Failed opening \'sig.php\' for inclusion (include_path=\'.:/usr/local/share/pear\') in /usr/local/www/data/phpfreaks/forums/topic.php on line 435

#5 zam

zam
  • Members
  • Pip
  • Newbie
  • 3 posts

Posted 22 October 2003 - 06:47 AM

got it working, thanks again.

and again, that was easy.. should rtfm.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users