I have this website where I have a page that displays a list of events, which is /eventos. But then, I want the events themselves to have a page as in /eventos/event-name, but the problem is that, now, /eventos is both a page and a directory (which includes the pages of the events). When I access the /eventos page it goes to the directory, as /eventos/, but that is not what I want, I want it to go to the .html page (/eventos.html also goes to /eventos/).

Example of /eventos/event-name

I have tried to solve this problem throught the .htaccess folder, with the following code:

RewriteBase /

RewriteRule ^eventos[/]?$ /eventos.html [L]

More from my .htaccess code

This should take the eventos/ and take it to /eventos.html, but instead it keeps accessing /eventos/, showing /eventos.html content, but giving me 404 errors while trying to access the scripts and styles folder to load the css, javascript, images, etc...

Fails to access /eventos

404 ERRORS

If you want to access the website for a closer look, it is the following: https://www.serius.pt/eventos

0 Answers