1
-Page
http:// is NOT http://www.
  • 2004/8/16 23:37

  • -Page

  • Just popping in

  • Posts: 74

  • Since: 2004/7/16


Since my mainfile.php is configured to http://(my address).com I've noticed that if I access the site under http://www.myaddress.com, I get the error "The Selected module does not exist. and if I configure mainfile.php to http://www. then the modules won't come up under http://my address.com ...

So, I tried:
----------------------------------------------------------
define('XOOPS_URL', 'http://myaddress.com ', 'http://www.myaddress');
----------------------------------------------------------
but it only seems to catch what ever one is first.

How can I get everything to work properly under both resolves? (http:// AND www.) ??

2
jmass
Re: http:// is NOT http://www.
  • 2004/8/16 23:47

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


I am not sure that you really can do exactly what you want without going through all of the multi site hacks.Yuck!

What I do is tho create an HTML redirect page for all of my other domains and redirect toward http://www.xyzcorp.com

You could also configure apache to do this for you, but I like to keep my apache config very clean and simple.

JMass

3
-Page
Re: http:// is NOT http://www.
  • 2004/8/17 0:02

  • -Page

  • Just popping in

  • Posts: 74

  • Since: 2004/7/16


Humm... I don't have access to the apache configuration. -- Thankfully so, - What a pile of pain!

What about a .htaccess include?

Has anyone ever seen an htaccess include that would send people to an alternate resolve? (all http:// requests sent to http://www.request)?

Is this possible??

4
jmass
Re: http:// is NOT http://www.
  • 2004/8/17 0:34

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


I said you could ALSO configure apache for this. You do not have to. I do not like to do it that way.

The simple way is to create a seperte site dir for each domain. It all of the "other" domains put an index.html file like:

<html>
<
head>
    <
meta http-equiv="REFRESH" content="0; URL=http://www.mycompany.com">
    <
title>My Companytitle>
head>
<
body>
body>


http://www.mycompany.com would be the url of your "real" XOOPS site.

Make sense?

JMass

5
tl
Re: http:// is NOT http://www.
  • 2004/8/17 0:44

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Xoops 2.0.7 should resolve to both

If you are using 2.0.6, you may want to take a look at this
http://xoops-tips.com/modules/news/article.php?storyid=4

6
djsckizo
Re: http:// is NOT http://www.
  • 2004/8/17 6:50

  • djsckizo

  • Just can't stay away

  • Posts: 401

  • Since: 2003/5/9 8


i run 2.0.7 and have the same problem.

7
mercibe
Re: http:// is NOT http://www.
  • 2004/8/17 8:09

  • mercibe

  • Just popping in

  • Posts: 55

  • Since: 2003/6/12


I think that your problem would be solved if you could use a relative XOOPS_URL url.

define('XOOPS_URL', '/');

That way you could access your site via HTTP, HTTPS and any domain name (IP address, proxy mapping, machine name, etc.)

Am I right ?

The problem is that today XOOPS cannot do it unless you apply an old hack (2.0.6) that I am still using on various production sites.

See:
https://xoops.org/modules/newbb/viewtopic.php?topic_id=13171&forum=21#forumpost69343
https://xoops.org/modules/newbb/viewtopic.php?viewmode=thread&topic_id=13171&forum=21&post_id=69661#69661

The Michael Wulff Nielsen code addition in XOOPS 2.0.7 (/include/commom.php) is good and needed, but not sufficient to make it work completely.

I still have to help to make it part of the XOOPS official kernel...

Regards,

Benoit

8
-Page
Re: http:// is NOT http://www.
  • 2004/8/17 8:20

  • -Page

  • Just popping in

  • Posts: 74

  • Since: 2004/7/16


Quote:



My Company




This is good advice, thank you jmass!
- I'm really only worried about people that type the domain in directly though.

I tried This advice too.
But it gave me this error:
----------------------------------------------------------
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/myaddress.com/include/common.php on line 235

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/myaddress/include/common.php on line 241
----------------------------------------------------------
So humm....

9
-Page
Re: http:// is NOT http://www.
  • 2004/8/17 8:45

  • -Page

  • Just popping in

  • Posts: 74

  • Since: 2004/7/16


-----------------------------------------------------------
V2.06 - http:// - www. resolve hack

https://xoops.org/modules/newbb/viewtopic.php?viewmode=thread&topic_id=13171&forum=21&post_id=69661#69661
-----------------------------------------------------------

Wow, that's quite a bit of hacking, thanks for the link mercibe!

It looks as though quite a few people have been here at length.

- It sure would be nice if were as easy as the the below!
----------------------------------------------------------
define('XOOPS_URL', 'http://myaddress.com ', 'http://www.myaddress');
----------------------------------------------------------



10
ChadK
Re: http:// is NOT http://www.
  • 2004/8/20 13:34

  • ChadK

  • Quite a regular

  • Posts: 242

  • Since: 2004/7/9 1


I was having a similar problem with my site where I have a parked domain iaparrot.com on my domain aviary.info and I wanted everything to work if they came to iaparrot.com... so...

I added this to the top of my mainfile.php (under the copyright/disclaimer stuff):
Quote:

$whathost=$_SERVER["HTTP_HOST"];
if($whathost != "www.aviary.info")
{
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.aviary.info".$_SERVER["REQUEST_URI"]);
exit();
}


Works fine.

Login

Who's Online

164 user(s) are online (127 user(s) are browsing Support Forums)


Members: 0


Guests: 164


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits