Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

WP Permalinks with Lighttpd and PHP-FPM

NanoG6NanoG6 Member
edited December 2011 in Help

Hi,

I'm using Lighttpd on my server installation, and permalinks went fine with PHP FastCGI. But recently I change FastCGI with PHP-FPM, and my custom permalinks no longer working.

Everytime I click a post / page, wordpress just brings me to the home / frontpage. My custom permalinks is like this /%postname%-%post_id%.html
But if I use custom permalinks like /index.php/%postname%/ or /index.php/archives/%post_id% (include the index.php) it works! But that is not what I want..

I tried using server.error-handler-404 = "/index.php" on lighttpd.conf but still no luck.

Any help would be greatly appreciated.
Thanks!

Comments

  • FreekFreek Veteran
    edited December 2011

    Never Mind. You're using lighttpd, was confused with nginx

  • I can't remember which light* webserver it is but one of them doesn't allow you to use the flash file uploader. Just an FYI....

    Did you reload lighttpd after making the change in lighttpd.conf?

    edit: This page says you're error line should be something else:

    http://www.cyberciti.biz/tips/lighttpd-and-wordpress-setup-clean-seo-friendly-urls.html

    I'm finding the line that you used many places but I'm finding this one in as many places.

  • NanoG6NanoG6 Member
    edited January 2012

    Hi guys thanks for the reply. Never mind I found the solution using mod_rewrite. I add this on my lighttpd.conf;

    $HTTP["host"] =~ "(^|\.)domain\.com$" {
       url.rewrite-once = (
          # Exclude additional specific directories from rewrites
          "^/(files)/?(.*)" => "$0",
     
          "^/(wp-.+).*/?" => "$0",
          "^/(sitemap.xml)" => "$0",
          "^/(xmlrpc.php)" => "$0",
          "^/keyword/([A-Za-z_0-9-])/?$" => "index.php?keyword=$1",
          "^/(.+)/?$" => "index.php/$1"
       )
    }

    It works now, thanks!

Sign In or Register to comment.