[TYPO3-english] Typoscript redirect

Nathan L typo3 at k9tfk.com
Mon Aug 10 17:19:12 CEST 2009


The problem with this solution is that it only works when Typo3 generates
the links using a typolink.  If I sent out a direct link in an email to all
my "members" saying they should get their info here:
http://example.com/secure/info/

Then when they click on the link in the email it will not direct them to the
login page if they aren't logged in.  It will give them a 404 file not found
error.

Now if I link to the /secure/info/ from the homepage using <link 56>Link to
secure page</link> then when the typolink is generated it will link to the
page that typolinkLinkAccessRestrictedPages is set to.

The only solution I've found so far would be to put a login form on the 404
page.  Personally, that doesn't work for my site because I use a static 404
file by setting
pageNotFound_handling=READFILE:fileadmin/templates/404.html.  I had to do
this because I was getting recursive 404 file not founds in my log file when
the 404 page was dynamically built due to the way my html was put together.

I think it may be possible to hard-code a static html login form that uses
javascript to put the value of location.href into a hidden form element
named "return_url" which the login form should use to redirect once it
receives a successful login.  Off to go code this...

--Nathan

On Mon, Aug 10, 2009 at 5:06 AM, Mauro Lorenzutti <
mauro.lorenzutti at webformat.com> wrote:

> Hi Thomas,
>
> you may try with:
>
> config.typolinkLinkAccessRestrictedPages = 123
>
> where 123 is the page id where your login form is presented.
>
> For more info:
>
> http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.2.1/view/1/7/#id4324729
>
> Regards,
>
> ---
>  Mauro Lorenzutti
>
> e-mail:  mauro.lorenzutti at webformat.com
> ---------------------------------------------------------
> WEBFORMAT srl | Corte Europa, 12 | I-33097 SPILIMBERGO PN
>     Tel +39-0427-926.389  --  Fax +39-0427-927.653
>       info at webformat.com  --  http://www.webformat.com
> ---------------------------------------------------------
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>



-- 
Nathan Lenz
nathan.lenz at gmail.com


More information about the TYPO3-english mailing list