[TYPO3-dev] real url configuration:Decoding Url

Andreas Förthner Andreas.Foerthner at netlogix.de
Fri Jun 23 17:51:10 CEST 2006


Nirmalya schrieb:
> hello,
> I am using typo3 version 4.0.,realurl version 1.1.0
> to activate real url i've configured as below:
> 1.".htaccess" in the root of your TYPO3-installation
>   added these lines:
>     RewriteEngine On
>     RewriteRule ^typo3$ - [L]
>     RewriteRule ^typo3/.*$ - [L]
>     RewriteCond %{REQUEST_FILENAME} !-f
>     RewriteCond %{REQUEST_FILENAME} !-d
>     RewriteCond %{REQUEST_FILENAME} !-l
>     RewriteRule .* index.php
> 2.TypoScript template
>    config.simulateStaticDocuments = 0
>    config.baseURL = 1
>    config.tx_realurl_enable = 1
>    #config.prefixLocalAnchors = all
>    config.baseURL = http://localhost:8080/myWebsite/typo3src/
> 3.in typo3conf/localconf.php
>  added these lines:
> 
> $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'][] 
> ='EXT:realurl/class.tx_realurl.php:&tx_realurl->encodeSpURL';
> $TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'][] 
> = 'EXT:realurl/class.tx_realurl.php:&tx_realurl->decodeSpURL';
> 
> $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
>      'init' => array(
>          'enableCHashCache' => 1,
>          'enableUrlDecodeCache' => 0,
>          'enableUrlEncodeHash' => 0,
>          'appendMissingSlash' =>'ifNotFile'
>      ),
>     'fileName' => array (
>          'defaultToHTMLsuffixOnPrev' => 1,
>          'index' => array(
>              'backend.php' => array(
>                  'keyValues' => array (
>                      'type' => 100,
>                  )
>              ),
>              'print' => array(
>                  'keyValues' => array(
>                      'type' => 98,
>                  )
>              ),
>          ),
>      ),
>    'pagePath' => array(
>          'type' => 'user',
>          'userFunc' => 
> 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
>          'spaceCharacter' => '-',
>          'languageGetVar' => 'L',
>          'expireDays' => 3,
>          'rootpage_id' => 1,
>         // 
> 'encodeTitle_userProc'=>'EXT:realurl/tx_realurl_encodeTitle_userProc.php:&user_encodeDates', 
> 
>      ),
> );
> 
> $TYPO3_CONF_VARS['EXTCONF']['realurl']['http://localhost:8080/typo3India/typo3src/'] 
> = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
> $TYPO3_CONF_VARS['EXTCONF']['realurl']['http://localhost:8080/typo3India/typo3src/']['pagePath']['rootpage_id'] 
> 
> = 1;
> 
> Result:
>  top Level:
>    <a href="home.html" >Home</a>
>    <a href="about-us.html" >About Us</a>
>    <a href="resources.html">Resources</a>
> 2nd Level:
>    <a href="resources/resource-1.html">Resource 1</a>
>    <a href="resources/resource-1/resource1-1.html">Resource1_1</a>
> Errors:
>    When I click over any hyperLink say on "Home" or "Resource 1"
> --------------------------
> Browser shows:
> Not Found
> The requested URL /myWebsite/typo3src/home.html was not found on this 
> server.
> Apache/2.0.55 (Win32) PHP/4.3.11 Server at localhost Port 8080
> --------------------------
> 
> *** I am expecting the encoded URL is not decoding.But cannot solve the 
> problem remaining...
> 
> so any help..over this real url configuration
> thank You,
> nirmalya
> ------
> http://www.typo3India.com
> 
> 
Hi,

if I see this right, you get an 404 error from Apache? Then the problem 
is not with realURL itself so far. If realURL would work and just the 
URL is wrong you would get an error from realURL not from Apache.

Are you sure that your rewrite engine works with apache? Just another 
hint: config.baseURL must be the base URL in version 4.0 not just a 1 as 
it was in previous versions...

hope this helps...

greets

Andreas




More information about the TYPO3-dev mailing list