VPSMATE

  • HOME
  • NEWS
  • VPS
  • DEDICATED
  • ARCHIVES
  • GoDaddy
  • SCRIPT
  • TOOLS
    • Traceroute
    • Benchmark
    • Useful Sites
  • Themes
  • GFW
VPSMATE
VPS COUPON & PROMOS | VPS & DEDICATED SERVERS OFFERS | VPS REVIEWS
  1. Main page
  2. Tips
  3. Main content

Lighttpd rewrite rules for WordPress sites

16/09/2014 5619hotness 0likes 1comments

Rewrite rules compatible with WordPress permalinks:

# Handle 404 errors
  server.error-handler-404 = "/index.php"
 
  # Rewrite rules
  url.rewrite-final = (
 
    # Exclude some directories from rewriting
    "^/(wp-admin|wp-includes|wp-content|gallery2)/(.*)" => "$0",
 
    # Exclude .php files at root from rewriting
    "^/(.*.php)" => "$0",
 
    # Handle permalinks and RSS feeds
    "^/(.*)$" => "/index.php/$1"
  )

 

Related

Tag: Nothing
Last updated:16/09/2014

kyaky

This person is a lazy dog and has left nothing

Like
< Last article
Next article >

Comments

  • rspoden

    Thank you for this! I had a heck of a time trying to figure out how to get lighttpd to play nice with permalinks, and your tip worked great!

    23/03/2021
    Reply
  • Cancel

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    COPYRIGHT © 2021 vpsmate.net. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang