KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
My wordpress blog is installed at domain.com/blog and I have a page with subpages whose structure look like domain.com/blog/page and domain.com/blog/page/subpage . I want my visitors to be able to go to domain.com/subpage and see the content of domain.com/blog/page/subpage without being redirected to that URL externally, avoiding wordpress permalink rewrites. I tried using RewriteRule ^subpage$ /page/subpage [L] and the content is being served, but the url looks like domain.com/blog/page/subpage (I'd guess Wordpress permalinks are getting to it.) .htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /blog/ RewriteRule ^index\.php$ - [L] // tried inserting my code here. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] </IfModule> # END WordPress EDIT: These logs show the activity on page visit - ip - - [19/Jun/2012:14:03:53 -0400] "GET /subpage/ HTTP/1.1" 301 - "http://domain.com/referrer/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20100101 Firefox/13.0.1" ip - - [19/Jun/2012:14:03:53 -0400] "GET /blog/page/subpage/ HTTP/1.1" 200 20022 "http://domain.com/referrer/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20100101 Firefox/13.0.1" Also, here is my root .htaccess - <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /blog/ RewriteRule ^subpage/?$ /blog/page/subpage/ [QSA,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] </IfModule> RewriteCond %{HTTP_HOST} ^domain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domain.com$
Tags (comma-separated)
Save Edits
Cancel