Need a little help with mod_rewrite / .htaccess

I’ve just moved all my sites to php8 and unfortunately this has created a problem (but in PIWIGO gallery) where I can no longer drop .php?. This creates an issue because after years of using the same URLs they no longer work.

What I’m trying to do, (could not find a solution on-line) is change the incoming URL to match what the web site is now having to display.

Here is the URL that I’m now having to use:

thumbnail page

and here is what I would like it to use:


and the same thing happens when displaying a photograph.


Here is what I have tried last. This manages to loose index.php? totally, but when the page displayes there is no CSS, just text.

RewriteCond %{THE_REQUEST} \s/index.php?(\S+)\s [NC]
RewriteRule ^ %1? [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/?$ index.php?=$1 [R=301,NE,L]

   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)/?$ /index.php/$1 [L]

If anyone can help, I’d be grateful, oh so grateful! - Nigel.

|Operating system |Ubuntu Linux 20.04.5|
|Webmin version 2.001
|Usermin version 1.860
|Virtualmin version 7.2-1

maybe ask the forum at piwigo, they have alot better knowledge about the software then here.


It’s a bug in their software, it used to this automatically and stopped on php8.

I’m hunting for a short term solution until they can get it fixed. Except for the home page none of the “outside links” on search engines etc work :frowning:
Thanks for the reply though.


So move to php7.4 won’t work?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.