S
S
sasha_pe2019-03-13 18:55:28
MODX
sasha_pe, 2019-03-13 18:55:28

Why is MODX giving 404 on the main page in context?

Created a context for modx. I decided to switch it by url. Made the plugin according to the instructions . Created a rule in .htaccess

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(context|context1)?/?(.*)$ index.php?contextKey=$1&q=$2 [L,QSA]

When you enter site.ru/context/ - modx gives 404 not found, although it should give the main one.
When you enter site.ru/context/(_request_) - modx gives the page.
I'm trying to figure out what the problem is. Maybe I wrote something wrong in the rules or something needs to be checked in modx?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sasha_pe, 2019-03-14
@sasha_pe

And the answer turned out to be very simple, although I studied modRewrite for two days, the point was that site_start was not correctly specified in the context settings. And as they say, I didn’t notice the elephant ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question