0

When I go to my first url, example: website.be/festivalName/eventName then te script on the url, website.be/festivalName, runs.

What am I doing wrong?

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ views/festivals/index.view.php?organisation=$1&festival=$2&event=$3 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)$ views/festivals/index.view.php?organisation=$1&festival=$2 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ views/organisations/index.view.php?organisation=$1 [L]
  • i think that the flag L is wrong, try with flags [QSA,L], see this post -> https://stackoverflow.com/questions/16468098/what-is-l-in-qsa-l-in-htaccess – Weber Sep 09 '19 at 09:23
  • @Weber thanks for the answer but it does not work. The script is still running in my organisations/index.view.php file. – Bert Hemelsoen Sep 09 '19 at 09:29
  • Can you try to put a static resource to the rewriterule like `RewriteRule ^organisations/([^/]+)$ views/organisations/index.view.php?organisation=$1 [QSA,L]` also try this for other rewrite – Weber Sep 09 '19 at 09:31
  • It's not intended that there are static resources in the url. – Bert Hemelsoen Sep 09 '19 at 09:39
  • Please explain what _exactly_ _“then te script on the url, website.be/festivalName, runs”_ means. Is `festivalName` a physically existing file; are you talking about this getting rewritten by your last rule, or …? – misorude Sep 09 '19 at 12:57
  • festivalName is not a file but is met to be replaced by the actual festival name in the database. – Bert Hemelsoen Sep 09 '19 at 14:59

0 Answers0