WordPress.org

Support

Support » How-To and Troubleshooting » Permalinks kill cgi-bin

Permalinks kill cgi-bin

  • Hi all–

    I’ve searched high and low, and none of the topics that touch on this issue have done the trick.

    I installed WordPress on an existing website in a subdirectory, /blog. I altered the .htaccess file to allow custom permalinks. In doing that, I seem to have rendered my cgi-bin unusable. I get a 404 when I try submitting any of the forms on the site that use .cgi scripts.

    My cgi-bin and .htaccess are in the root, as is the blog directory, where WordPress lives.

    I’m not well versed with .htaccess files, so I’m going on what I’ve found in the forums here and on other forums. The commented out lines are solutions I’ve tried that haven’t worked.


    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    #RewriteCond %{REQUEST_URI} !^/cgi-bin/
    #RewriteRule ^cgi-bin(/.*)?$ - [L]
    #RewriteRule ^(.*)$ $1.html
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    # END WordPress

    Thanks in advance for the help, and apologies if anything I’ve posted is unclear.

    I’m on 3.1.3.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Have you tried moving your .htaccess to the ‘blog’ directory?

    Hey Alex–

    Thanks for the quick reply. I gave that a shot, but no luck. The issue persists, and I’m not sure what to try next or how to elaborate on the issue in order to help you (or others) help me.

    I’ll continue to search and try some things, but if anyone can come to the rescue, I’d be very grateful!

    Thanks.

    If you moved to the blog directory, the .htaccess file should look like:

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

    Or if you want to leave it in the root, use this

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/cgi-bin/
    RewriteRule . /blog/index.php [L]
    </IfModule>
    # END WordPress
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Permalinks kill cgi-bin’ is closed to new replies.
Skip to toolbar