[TYPO3-dev] Problem with RealUrl on multi-domain
Florian Rival
contact at oktopuce.fr
Tue Aug 5 16:33:39 CEST 2014
I've founded the solution, I give it for those having the same problem :
In "realurlconf.php" I've added this :
global $TYPO3_CONF_VARS;
before
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
'www.domain1.fr' => $tx_realurl_config,
'domain1.fr' => 'www.domain1.fr',
'www.domain2.fr' => $tx_realurl_config,
'domain2.fr' => 'www.domain2.fr',
);
And now everything works.
Le 05/08/2014 12:44, Florian Rival a écrit :
> Hi,
>
> My RealUrl configuration with multi-domain on Typo3 v6 doesn't work.
>
> The RealUrl result is this :
>
> http://www.domain1.fr/index.php?id=10 => http://www.domain1.fr/10/
> http://www.domain2.fr/index.php?id=20 => http://www.domain1.fr/20/
>
> Instead of this :
>
> http://www.domain1.fr/index.php?id=10 =>
> http://www.domain1.fr/page10-title/
> http://www.domain2.fr/index.php?id=20 =>
> http://www.domain1.fr/page20-title/
>
> My configuration is :
>
> 1. realurlconf.php
>
> $tx_realurl_config = array(
> 'init' => array ( .... ),
> 'preVars' => array ( .... )
> );
>
> $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
> 'www.domain1.fr' => $tx_realurl_config,
> 'domain1.fr' => 'www.domain1.fr',
> 'www.domain2.fr' => $tx_realurl_config,
> 'domain2.fr' => 'www.domain2.fr',
> );
>
> $TYPO3_CONF_VARS['EXTCONF']['realurl']['www.domain1.fr']['pagePath']['rootpage_id']
> = 1;
> $TYPO3_CONF_VARS['EXTCONF']['realurl']['www.domain2.fr']['pagePath']['rootpage_id']
> = 2;
>
> 2. .htaccess
>
> RewriteEngine On
> RewriteRule ^/typo3$ - [L]
> RewriteRule ^/typo3/.*$ - [L]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME} !-l
> RewriteRule .* /index.php
>
> # redirection with the www
> RewriteCond %{HTTP_HOST} ^domain1\.fr$ [NC]
> RewriteRule ^(.*)$ http://www.domain1/$1 [R=301,L]
>
> RewriteCond %{HTTP_HOST} ^domain2\.fr$ [NC]
> RewriteRule ^(.*)$ http://www.domain2/$1 [R=301,L]
>
> 3. TS
>
> config {
> baseURL = http://www.domain1.fr/
>
> typolinkCheckRootline = 1
>
> typolinkEnableLinksAcrossDomains = 1
>
> tx_realurl_enable = 1
>
> simulateStaticDocuments = 0
> }
>
> The same for domain #2 with baseURL = http://www.domain2.fr/
>
> 4. Domain (typo3 BE)
> www.domain1.fr and www.domain2.fr : allways prefix with this domain
> checked
> domain1.fr and domain2.fr : nothing checked
>
> 5. Website root
> Reset constant and setup checked
> Website root checked
>
>
> Thanks for your help.
>
--
Re: [TYPO3-dev] How to call Extbase controller action from piBase-Plugin?
==================================================
Florian Rival
Oktopuce
tel.: +33-642-255-448
fax : +33-985-375-102
web: www.oktopuce.fr
==================================================
More information about the TYPO3-dev
mailing list