"RewriteEngine On" and static pages

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: "RewriteEngine On" and static pages

Post by Timbalu » Sat Sep 06, 2014 10:54 am

We need to state here, that with mod_rewrite ON you would only need to change the staticpage path itself, which could be done via a batch, eg

Code: Select all

UPDATE serendipity_staticpages SET permalink = REPLACE(permalink, "/index.php?/pages/", "/pages/") WHERE permalink LIKE '%index.php%';
(I dont even think you'd need the WHERE part.)

There is no need to rewrite any other links pointing to the required static page from '/index.php?/pages/example.html' to '/pages/example.html' too (other than esthetic point of views).
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Post Reply