[wp-hackers] How to make root relative urls work in, , subdomain

Ryann Micua ryannmicua at gmail.com
Tue Nov 1 03:38:50 UTC 2011


Hi Marcus,

The rewrite doesn't seem to be working on my local server. But, if you 
say that it's the right then I think it's something wrong with my lamp 
setup I'll look into it. we came up with almost the same rules anyway =) 
save for taking out the domain name and adding flags.

> Hey Ryann, unfortunately I got sucked into a 6 hour meeting in the next 10 minutes so I won't be able to write up a response as complete I would like.  But I can fill you in on more details tomorrow if you don't figure out an option from this response.
>
> Basically you are 90% of the way there.  I'm not sure if the email thread removed the newline, but you'll want to put the RewriteRule on its own line underneath the RewriteCond statement.  You can also take outhttp://wp.dev  and just use/testproject/$1.  And additionally you will want to put [R=301,L]  which indicates that the redirect is a permanent move (301) and to stop processing anymore rules L == Last Rule.
>
> Otherwise the rest looks good.  If the above suggestions don't work out let me know and I'll spend a little more time looking at it.  Here's a formatted version for you to view..
>
> RewriteEngine on
>
> #be sure to include the wordpress .htaccess rules here
>
> #and put this at the bottom of your file
> RewriteCond %{REQUEST_URI} !^/testproject/
> RewriteRule ^wp\.dev/(.*)/testproject/$1 [R=301,L]
>
> #end of file


-- 
*Ryann Micua*
/Web Developer/
------------------------------------------------------------------------

Website: /www.pogidude.com/
Skype: /rmicua/
Mobile: /+639169273059/



More information about the wp-hackers mailing list