[TYPO3-english] how to remove the trailing slash from url's

Rupali rupali.ffm at googlemail.com
Thu Jan 8 15:33:29 CET 2009


well, removing echo from scripts removes warnings, but my problem is also
not solved.
always,
www.abc.com/my-page/
and www.abc.com/my-page

both exist. i wanted to generate 404 for www.abc.com/my-page/ and rediect to
www.abc.com/my-page

Can anybody guide me pls?

2009/1/8 Xavier Perseguers <typo3 at perseguers.ch>

> Hi,
>
> Rupali wrote:
> > i uploaded a file named 'class_ux_tx_realurl.php'  inder ext/realurl:
> > wrote following code there:
> >
> > <?php
> >  class ux_tx_realurl extends tx_realurl {
> >          function encodeSpURL(&$params, &$ref) {
> >                  parent::encodeSpURL($params, $ref);
> >                  echo 'encode:';
> >                  debug($params['LD']['totalURL']);
> >          }
> >          function decodeSpURL($params, &$ref) {
> >                  echo 'decode:';
> >                  debug($params['LD']['totalURL']);
> >                  parent::decodeSpURL($params, $ref);
> >          }
> >  }
> > ?>
> >
> > [snip]
> >
> > now i am getting following warning:
> > Warning: Cannot modify header information - headers already sent by
> (output
> > started at /kunden/
> >
> brainfruit.de/WebRoot/brainfruit.com/www/typo3conf/class_ux_tx_realurl.php:11
> )
> > in /kunden/
> >
> brainfruit.de/WebRoot/brainfruit.com/www/typo3/sysext/cms/tslib/class.tslib_fe.phpon
> > line 3226
> >
> >
> > what should i do?
>
> Not sending headers after having sent something to the browser :-) That
> is simply not using echo and debug when the method you call afterwards
> is issuing header() call.
>
> A quick look on Google tells you everything why it does not work:
>
> http://www.tech-recipes.com/rx/1489/solve-php-error-cannot-modify-header-information-headers-already-sent/
>
> --
>  Xavier Perseguers
> http://xavier.perseguers.ch/en/tutorials/typo3.html
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>


More information about the TYPO3-english mailing list