All pastes #450691 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-04-21 00:50 UTC
rendered paste body
In Httpd.conf:
	RewriteEngine On
        RewriteCond %{HTTP_HOST}        !^www.mydomain.com$ [NC]
        RewriteRule ^/(.*)      http://www.mydomain.com/$1        [R=301]
##  These are the problem lines        
        RewriteCond %{REQUEST_URI} ^/blog/old-blog-post.*$
        RewriteRule ^ - [E=REQUEST_URI:/blog/new-blog-post/]   
##

In .htaccess in /blog/:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>

# END WordPress


In index.php:

if ( $_SERVER['REMOTE_ADDR'] == "my.ip.here.x" ) {
print "var:";
print $_SERVER['REQUEST_URI'];
}


Result = output is always  "var: /blog/old-blog/post/", REQUEST_URI has not been rewritten.