p.dahl
p.dahl

Reputation: 1

TYPO3 Rewrite Extension URL tx_xyz to another name

I have a TYPO3 extension for content output. If I call the contents, the name of the extension is always called:

example.com/?tx_nameoftheextension[id]=1234

The number 1234 is a changing ID. I would like a resolution of the extension to:

example.com/detail/1234

I tried a little bit, but the following syntax does not work for me:

RewriteCond %{QUERY_STRING} ^tx_\nameoftheextension\[id\]=1234$
RewriteRule .* example.com/detail/1234? [R=301,L]

Of course the upper one would work with RealUrl, but only with database connection, I would like to solve this without.

But this is only the beginning, I have different display options in the extension which append a longer extension name, which I would like to rewrite that didn´t run with RealUrl:

example.com/?tx_nameoftheextension[action]=showN&tx_nameoftheextension[n_id]=1234

to

example.com/detail/n/1234

Try with this .htaccess syntax:

RewriteCond %{QUERY_STRING} ^tx_\nameoftheextension\[action\]=showN&tx_\nameoftheextension\[n_id\]=1234$
    RewriteRule .* example.com/detail/n/1234? [R=301,L]

Upvotes: 0

Views: 129

Answers (0)

Related Questions