SiimKirjanen / seatreg

WordPress plugin that lets you design your own seat map and manage seat bookings
GNU General Public License v2.0
14 stars 7 forks source link

Permalink 404 issue #246

Closed SiimKirjanen closed 1 month ago

SiimKirjanen commented 1 month ago

Issue mentioned at https://wordpress.org/support/topic/404-not-found-166/ Apache 404 error page is thrown when using plain or month and name permalink structure (when accessing registration page). This occurs when the URL structure does not match the configured permalink settings and Apache can't find a matching file or directory. So when using plain permalinks and try to navigate to http://test.com/seatreg/?seatreg=registration&c=6dd5bfa2a9 (registration page) then WordPress does not see this as a valid query string it can process because it doesn't match the plain permalink structure. Apache, acting as the web server, tries to find a physical file or directory that matches the path /seatreg. When it doesn't find one, Apache returns a 404 error before WordPress can process the request.

/seatreg URL part is needed to solve Elementer plugin conflicts https://github.com/SiimKirjanen/seatreg/pull/242.

SiimKirjanen commented 1 month ago

Some investigation. By modifing.htaccess file by adding

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^seatreg/?$ index.php [L,QSA]
</IfModule>

And adding &page_id=1234556 GET param to registration URL (http://test.com/seatreg/?seatreg=registration&c=6dd5bfa2a9&page_id=123445) will show registration page