[wp-hackers] Rewrite Experiment

Ryan Boren ryan at boren.nu
Sat Sep 18 07:49:15 UTC 2004


On Sat, 2004-09-18 at 02:41 -0500, 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?

Oops.  I sent the wrong version.  That one is missing the -d test. Try
this:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php/$1


Ryan





More information about the hackers mailing list