0

We would like to create a RewriteRule in Contao

The call "https://www.test.de/jobs/tester" should redirect to the URL "https://www.test.de/jobs?id=tester".

So in my understanding of htaccess the rule should look like this:

RewriteEngine On
RewriteRule ^jobs/([^/]*)$ /jobs?id=$1 [L]

But Contao ignores this RewriteRule completely and always displays an error message. The rule is located after the opening <IfModule mod_rewrite.c> at the very beginning of the htaccess file.

We use Contao Version 4.4

MAESTRO_DE
  • 433
  • 2
  • 17
  • It would be worth adding your actual error message. The RewriteRule looks good to me too. Try adding your rule after setting the `RewriteBase`, referencing the default .htaccess https://github.com/contao/core/blob/3.5.17/.htaccess.default#L249-L253 – wp78de Oct 30 '20 at 21:55
  • Contao forum thread for reference: https://community.contao.org/de/showthread.php?79299-RewriteRules-in-Contao-funktionieren-in-der-htaccess-Datei-nicht – fritzmg Nov 05 '20 at 09:39

0 Answers0