Get 'domainname' and search for it in the db

Author Message

Mark Overduin

Friday 22 August 2003 5:33:30 am

How do I get the domainname the site is running on?

So, if the url is "http://www.mydomain.com/index.php/www/content/view/...", how do I get 'mydomain.com' (without 'www' plz) out of it?

The next thing I'd like to do, is to search a specific folder (sites) for a folder named 'mydomain.com' (and get the id of that folder).

The reason I want to do this, is because I'm building one site, that can be used by multiple sites, but with other id's (so the content is entirely different).
I have a folder (sites) that contains other folders (mydomain.com, mycompany.net, amioriginalorwhat.com, etc...).

Result: If the domainname for instance is 'mycompany.net', the script looks for that domainname and shows all the content for 'mycompany.net'.

Hope anyone can help me!

Thanx in advance, Mark

Mark Overduin

Monday 25 August 2003 12:31:44 am

Anyone?

Bjørn Kaarstein

Monday 25 August 2003 2:46:59 am

In site.ini, or site.ini.append.php you can specify your URL's

[SiteAccessSettings]
CheckValidity=false
MatchOrder=host
HostMatchMapItems[]=www.mydomain.com;mydesign
HostMatchMapItems[]=mydomain.com;mydesign
HostMatchMapItems[]=admin.mydomain.com;admin

Here you can see that www.mydomain.com and mydomain.com will be set to use the "mydesign" siteaccess.

This will need to be set up in your apache and DNS records aswell.

Regards Bjørn

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:18:44
Script start
Timing: Jan 31 2025 06:18:44
Module start 'layout'
Timing: Jan 31 2025 06:18:44
Module start 'content'
Timing: Jan 31 2025 06:18:45
Module end 'content'
Timing: Jan 31 2025 06:18:45
Script end

Main resources:

Total runtime1.0354 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.2656151.2266
Module start 'layout' 0.00530.0021 739.492236.6797
Module start 'content' 0.00741.0271 776.1719892.3125
Module end 'content' 1.03450.0008 1,668.48447.8125
Script end 1.0353  1,676.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2879160.0002
Check MTime0.00120.1188160.0001
Mysql Total
Database connection0.00070.067810.0007
Mysqli_queries0.989695.5823570.0174
Looping result0.00050.0447550.0000
Template Total1.005797.120.5028
Template load0.00190.186220.0010
Template processing1.003796.943720.5019
Template load and register function0.00150.146210.0015
states
state_id_array0.00120.120610.0012
state_identifier_array0.00100.095320.0005
Override
Cache load0.00160.1581240.0001
Sytem overhead
Fetch class attribute can translate value0.00060.056020.0003
Fetch class attribute name0.00190.181530.0006
XML
Image XML parsing0.00020.022720.0001
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00070.0631100.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs