Skip to content

.htaccess and rewrites

If the plugin's URLs return 404, the rewrite rules are not being honored. This is the single most common first-time issue.

Symptoms

  • Schedule URLs return WordPress 404 pages.
  • WP Admin shows a banner about Plain permalinks or a missing .htaccess.

Quick fix

Image Rotation includes a one-click fix in the host-prereq banner. Click it, and the plugin attempts to:

  • Switch your permalink structure off "Plain".
  • Write or update .htaccess with the standard WordPress rewrite block.
  • Flush rewrite rules.

Manual fix (Apache)

  1. WP Admin → Settings → Permalinks → choose any structure other than "Plain" → Save.
  2. If .htaccess is not writable, copy the rules WordPress shows you on the Permalinks page into .htaccess manually.
  3. WP Admin → Image Rotation → Schedules → click any schedule's URL to verify it returns an image.

Manual fix (nginx)

Add this to your server block (typically in your host's nginx config or via your host's control panel):

location / {
    try_files $uri $uri/ /index.php?$args;
}

Then reload nginx. The plugin's rewrite rules then work the same as on Apache.

If the banner persists after fixing

Visit Image Rotation → Dashboard. The host-prereq check re-runs on page load. If everything is now correct, the banner disappears.