[wp-hackers] Rewrite Experiment

Mark Jaquith mark.wordpress at txfx.net
Sat Sep 18 17:35:58 UTC 2004


Ryan Boren wrote:

>On Sat, 2004-09-18 at 05:03 -0400, Mark Jaquith wrote:
>  
>
>>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
>>>
>>>      
>>>
>>Yeah, I e-mailed Matt with a similar scheme a few days ago.  I've been 
>>testing it and it works great.
>>    
>>
>
>Matt forwarded me your email, which prompted me to get off my ass and
>start looking at this again.  It's a nifty solution.
>
>  
>
>>  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/ ).
>>    
>>
>
>I have no problem with pathinfo feeds in CVS.  1.2 does not support
>feeds via pathinfo, but CVS "should" be fine.  I'll look into it.
>
>  
>
>>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.
>>    
>>
>
>There's lots of upside, assuming it works for everyone.  If anyone is
>running Apache 1.3, I'd be particularly interested in knowing if this
>works.  mod_rewrite in 1.3 has a number of bugs and missing features
>that we have to work around.  If this works, we can handily avoid all of
>those bugs.
>
>Ryan
>
>
>_______________________________________________
>hackers mailing list
>hackers at wordpress.org
>http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>
>
>  
>
I'm still having problems with pathinfo feeds in CVS.

Here's the lowdown:

blog URI: http://txfx.net/wp_test/  (I update it to most recent CVS just 
about daily.)

Settings:
Wordpress address: http://txfx.net/wp_test
Blog address: http://txfx.net/wp_test
Permalink structure: /index.php/%year%/%monthnum%/%day%/%postname%/

Now notice on the main page that the link to the RSS on the sidebar is 
to http://txfx.net/wp_test//feed/rss2/  (double slash intentional)

That URI gives a 404.  Manually going to 
http://txfx.net/wp_test/index.php/feed/rss2/ just loads the blog's home 
page.

If I change the permalink structure to 
/%year%/%monthnum%/%day%/%postname%/ and implement the "universal rule" 
rewrite trick to convert to pathinfo versions, the URIs all look right, 
but none of the feed ones work, just like with Craig's 1.2 install.

When converting to old mod_rewrite, everything works as it should with 
feeds.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/hackers_wordpress.org/attachments/20040918/36efdcdd/attachment.htm


More information about the hackers mailing list