developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 9 years ago

#831 closed enhancement (wontfix)

Possibility to bind different DNS entries to specific modules

Reported by: pulsation Owned by:
Priority: high Milestone:
Component: jelix:plugins:urls Version: 1.1RC2
Severity: normal Keywords: significant urls
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

It would be interesting to have different DNS entries pointing to the same server, but to different jelix modules and actions. For example, home.mysite.com would bind to the "home" module, and contact.mysite.com would bind to the "contact" module.

This patch against 1.1RC2 is a modification of the significant engine that allows a "servername" parameter in urls.xml to bind a module / action to a specific server name. For example:

<url servername="home.mysite.com" pathinfo="/" module="home" action="home:index" >
<url servername="contact.mysite.com" pathinfo="/" module="contact" action="contact:index" >

Anyway, it looks like when pathinfo="/" is used, static parameters won't be provided to the url as startModule and startAction are reached.

Attachments (2)

server_name_significant.diff (11.0 KB) - added by pulsation 12 years ago.
server_name_significant.2.diff (16.6 KB) - added by pulsation 12 years ago.
This patch doesn't modify jCoordinator, and fixes bugs of the first one.

Download all attachments as: .zip

Change History (10)

Changed 12 years ago by pulsation

Changed 12 years ago by pulsation

This patch doesn't modify jCoordinator, and fixes bugs of the first one.

comment:1 Changed 12 years ago by laurentj

  • Component changed from jelix to jelix:plugins
  • Keywords significant urls added

Why don't you create two different applications, one for each domain name, with their own url mapping ?

comment:2 Changed 11 years ago by foxmask

peut-etre que la reponse tiens cela :

depuis un sous domain, style forum.domain.com, j'aimerai accede au module "portail" se trouvant l'adresse domain.com

Donc ok j'ai bien 2 vhosts et 2 mappings adns urls.xml mais aucun des 2 ne me permet de passer de l'un l'autre via

 jUrl('forum~default:index');
 jUrl('portal~default:index');

Donc peut etre que si on utilisait ce qu'il propose comme property supplementaire ou bien si on pouvait mettre une URI dans la property pathinfo, alors on s'en sortiait ?

exemple dans le urls.xml du forum :

 <!-- forum access -->
 <url pathinfo="/" module="forum" action="default:index"/>

 <!-- portal access -->
 <url pathinfo="http://domain.com/" module="portal" action="default:index"/>

et dans urls.xml du portal :

 <!-- forum access -->
 <url pathinfo="http://forum.domain.com" module="forum" action="default:index"/>

 <!-- portal access -->
 <url pathinfo="/" module="portal" action="default:index"/>

Une ide qui rejoindrai le ticket #616 ?

comment:3 Changed 11 years ago by pulsation

Why don't you create two different applications, one for each domain name, with their own url mapping ?

Indeed, by design these urls point to different modules of a whole application, not to different applications.

Our primary idea was to use the whole possibilities of an url, including the server name, to access modules and make these urls a bit more "sexy".

comment:4 Changed 11 years ago by laurentj

  • Milestone set to Jelix 1.2
  • review set to review?

comment:5 Changed 11 years ago by laurentj

  • Component changed from jelix:plugins to jelix:plugins:urls

comment:6 Changed 11 years ago by laurentj

  • Milestone changed from Jelix 1.2 beta to Jelix 1.2

comment:7 Changed 10 years ago by laurentj

  • Milestone changed from Jelix 1.2 to Jelix 1.3
  • Priority changed from normal to high

comment:8 Changed 9 years ago by laurentj

  • Milestone Jelix 1.3 deleted
  • Resolution set to wontfix
  • review review? deleted
  • Status changed from new to closed

patch do not apply anymore. no tests. and not convinced by the usefulness of the patch. one domain = one application with jelix.

Note: See TracTickets for help on using tickets.