Home page 404s when URL filter set for pages
I noticed this first on my site, but then downloaded a copy of Bludit to run locally and found that the issue existed there too.
If I set a URL filter for Pages (for example, "/post/" to make the URLs the same as my old Nibbleblog URLs) the home page gives me a Page Not Found error. This happens on all the themes I tested it on (Blog X, Blue and Alternative). This also happens whether my home page is the default list of recent posts, or a custom page.
The problem seems to be that $WHERE_AM_I is "page" when on the homepage while a URL filter is set, instead of "home" like it is when the URL filter is left empty.
If I set a URL filter for Pages (for example, "/post/" to make the URLs the same as my old Nibbleblog URLs) the home page gives me a Page Not Found error. This happens on all the themes I tested it on (Blog X, Blue and Alternative). This also happens whether my home page is the default list of recent posts, or a custom page.
The problem seems to be that $WHERE_AM_I is "page" when on the homepage while a URL filter is set, instead of "home" like it is when the URL filter is left empty.
I tested it both on my localhost and on my public site, by editing the .htaccess to this:
I saw no change in the bug, no matter whether I visited my website's root with a trailing slash or without. The home page seems to be unable to call setWhereAmI('home'); in url.class.php when I have a URL filter for pages.
Code: Select all
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
# Enable rewrite rules
RewriteEngine on
# Base directory
RewriteBase /bludit/
#These lines added
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [R=301,L]
RedirectMatch 301 /tag/(.*)/ http://localhost/bludit/tag/$1
RedirectMatch 301 /page/(.*)/ http://localhost/bludit/$1
# Deny direct access to the next directories
RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]
# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]
</IfModule>
Hi,
the name of the filter is "page" for the WhereAmI.
Can you try to do the same changes in the demo ?
https://demo.bludit.com
and check if works ?
Thanks
the name of the filter is "page" for the WhereAmI.
Can you try to do the same changes in the demo ?
https://demo.bludit.com
and check if works ?
Thanks