Need WordPress htaccess help

Discussion in 'Apache' started by SixSigma, Mar 24, 2010.

  1. #1
    I went from Windows to Linux hosting, and I've having trouble with the WordPress URL's. On Windows, the URL's had the following format:

    domain.com/blog/index.php/post-name/

    I tried to get it set up that way on the new host, but the only thing that seems to work within WordPress is to set the permalinks to /%postname%/ and the resulting URL's don't have the index.php, as such:

    domain.com/blog/post-name/

    All external links are in the /blog/index.php/post-name/ format, so they're broken. The problem is, WordPress generated the following htaccess file in the /blog folder, which seems to do the opposite of what I want:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    # END WordPress

    Is there anyway to fix this so the external links are 301'd to the new URL's?
     
    SixSigma, Mar 24, 2010 IP
  2. thedark

    thedark Well-Known Member

    Messages:
    1,346
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    168
    Digital Goods:
    1
    #2
    Try to set the custom permalink structure to /index.php/%postname%/
     
    thedark, Mar 25, 2010 IP
  3. SixSigma

    SixSigma Peon

    Messages:
    164
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I should have mentioned that I already tried that. With a /blog/index.php/ permalink structure, WordPress displays "No input file specified" on each of the post pages. The /blog/ home displays normally, but /blog/index.php does not.

    When the permalink structure was changed to /blog/index.php, I noticed that the htaccess file remained exactly the same as above. I deleted the contents of the htaccess, but that had no effect on the blog.
     
    SixSigma, Mar 25, 2010 IP