[wp-hackers] Rewrite Experiment

Mark Jaquith mark.wordpress at txfx.net
Sat Sep 18 09:03:59 UTC 2004


Ryan Boren wrote:

>Get rid of all of your rewrite rules and replace them with this:
>
>RewriteEngine On
>RewriteBase /
>RewriteCond %{REQUEST_FILENAME} !-f
>RewriteRule ^(.+)$ /index.php/$1
>
>Adjust your base accordingly.  If you're running from a subdir, let's
>say "wordpress", you'll need:
>
>RewriteEngine On
>RewriteBase /wordpress/
>RewriteCond %{REQUEST_FILENAME} !-f
>RewriteRule ^(.+)$ /wordpress/index.php/$1
>
>Does it work?
>
>Ryan
>
>
>_______________________________________________
>hackers mailing list
>hackers at wordpress.org
>http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>
>
>  
>
Yeah, I e-mailed Matt with a similar scheme a few days ago.  I've been 
testing it and it works great.  The only problem right now is that 
pathinfo appears to be broken for feeds.  
site.com/wordpress/index.php/feed/atom/ won't work using latest CVS, it 
just returns the blog's home page.  The same thing can be seen on 
Craig's site ( http://blog.nuclearmoose.com/feed/rss2/ ).

Upsides of this method: no need to update rules with new WordPress 
version of URI scheme.  Simplification of all the mod_rewrite rule 
creation code.



More information about the hackers mailing list