Redirect /index.php to /?

Hi,

Our old website was also coded in php, and all over the internet and Google search are links leading to https://www.fastionline.org/index.php. Problem is when you follow this to the new Omeka S site, you just get a 404.

Any suggestions for how to make an explicit incoming request for /index.php redirect to / so it goes to the default site?

Ive tried some rewrite rules, but they’ve black magic and I just get endless redirects. I also tried to set a route in module.config.php, but the rewrites get there first.

John.

This can be a little tricky because the Omeka S site is also “at” index.php, so it’s easy to create a loop trying to do this redirect.

Try this:

RewriteCond %{ENV:REDIRECT_OMEKA_REQ} !"1"
RewriteRule ^index\.php$ "https://www.fastionline.org" [R,L]

as the first rewrite rule in your .htaccess (so, right under RewriteEngine On).

Thanks John, that worked perfectly! Happy client :slight_smile:

John.