Support » Fixing WordPress » Removing built in WP rewrite rule

  • I have a curious WP set up, using an index.html, and various rewrites and redirects. I have one issue that I cannot solve, with attachment URLs.

    For some attachments that are not yet attached to a post, their attachment page URL is like


    Because I am using an index.html though, this URL does not work. I need it to have ‘index.php’ in there as well, so it would be:


    I have the redirect set up in htaccess, but as soon as the URL with index.php (URL 2) in it gets requested, there is a 301 redirect back to the version without (URL 1). I am assuming this is built in WordPress rewrite functionality, and I have tried all kinds of methods to get around it but I cannot seem to.

    Can someone tell me how, if a URL like (2) is requested, I can stop it from getting redirected to (1)?

    Thank you!

  • The topic ‘Removing built in WP rewrite rule’ is closed to new replies.