WordPress.org

Forums

Removing built in WP rewrite rule (1 post)

  1. joseph.c.lawrence
    Member
    Posted 1 year ago #

    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

    1) http://www.domain.com/?attachment_id=1234567

    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:

    2) http://www.domain.com/index.php?attachment_id=1234567

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by joseph.c.lawrence
  • This topic is not resolved
  • WordPress version: 3.9.1