Welcome to Geeklog, Anonymous Sunday, November 09 2025 @ 02:33 am EST
Geeklog Forums
staticpages plugin in 2.2.2
MattC
I'm just doing a dry run of updating a 2.1.3 geeklog site to 2.2.2, and nearly everything is perfect, the static pages plugin has been bumped up from 1.6.9 to 1.7.3
The one issue I have is that I have url_rewrite turned on, and historically we'd have all the links to static pages formatted as:
/staticpages/index.php/22222222222222222
which now gives a 404 error. The following both work fine:
/index.php/page/22222222222222222
/staticpages/index.php?page=22222222222222222
but because we'll have a whole lot of existing pages in the first form indexed with google etc, I don't really want to have to change that throughout the site and have the search engines have to reindex it all etc
is this a bug? is there a quick fix?
thanks
Matt
MattC
/links/portal.php/link/2222222222222222
no longer works, but both
/links/portal.php?what=link&item=2222222222222222
/index.php/links/portal/2222222222222222
do
Laugh
https://www.geeklog.net/staticpages/index.php/about
So my guess it is either a Geeklog Configuration settings, URL Routing settings or maybe a htaccess issue.
Here are the docs:
https://www.geeklog.net/docs/english/config.html#url-rewrite
Geeklog.net Configuration settings are:
Enabled URL Rewrite: True
Enable URL Routing: Disabled
Maybe your URL Routing is enabled as when it is the default routing looks like
/index.php/page/22222222222222222
One of the Geeklog Core Developers.
MattC
thanks for the reply.
URL routing is enabled, but it was when I was running 2.1.3 too, and prior to updating to 2.2.2 urls of the forms
/staticpages/index.php/22222222222222222
/links/portal.php/link/2222222222222222
definitely worked fine, but now definitely don't. AFAICT mode_rewrite & .htaccess etc are the same for both sites.
I've updated links now, so will keep with the new URL styles and let the search engines re-index to pick up the new links
thanks again
Matt
::Ben
Hi Matt,
I know this topic is a few months old, but since others might face the same issue after upgrading from Geeklog 2.1.3 to 2.2.2, here’s a clear way to fix it.
Why It Happens
Geeklog 2.2.x changed how URL Rewriting and URL Routing handle static pages.
The old format:
is no longer supported and will now return a 404 error.
The new valid formats are:
/staticpages/index.php?page=your-page-id
✅ Quick Fix #1 — Add a Redirect Rule in .htaccess
If your site runs on Apache, this is the easiest and safest fix.
Add the following line before any existing Geeklog rewrite rules in your .htaccess file:
RewriteRule ^staticpages/index\.php/([A-Za-z0-9_-]+)$ /staticpages/index.php?page=$1 [R=301,L]
This creates a 301 redirect, so:
- Old URLs still work.
- Google preserves your SEO ranking.
- Users are seamlessly redirected to the new URL structure.
✅ Quick Fix #2 — Add a Custom Route (if URL Routing is enabled)
If you’re using URL Routing, add a custom rule in Admin → URL Routing (/admin/router.php):
Save and clear the cache. This tells Geeklog to recognize the old URL pattern again.
✅ Quick Fix #3 — Disable URL Routing (optional fallback)
If you only use URL Rewriting, you can disable URL Routing under:
Configuration → Miscellaneous → URL Routing
Geeklog will then revert to the older rewrite behavior.
💡 Recommended
Option #1 (.htaccess redirect) is the cleanest solution — no database changes, minimal risk, and full backward compatibility.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content