Forum Moderators: phranque

Message Too Old, No Replies

http://domain.com/subdirectory/ to http://www.domain.com/subdirectory

subdirectory with www to subdirectory with

         

Hemeno

9:45 pm on Feb 12, 2006 (gmt 0)

10+ Year Member



Ok, I have tried quite a few things lately to get this to work. Apparently when I changed my setting in Wordpress to friendly URLs, any links to the blog will give me:

[domain.net...]

In the process, my PR for these pages and backlinks are all screwed up since they are pointing to [domain.net...]

I've tried:

RewriteCond %{HTTP_HOST} ^domain\.net [NC]
RewriteCond %{REQUEST_URI} ^subdirectory/*$ [NC]
RewriteRule ^www.domain.net/subdirectory/$1 [R=301,L]

This doesn't do anything. I'm guessing I need to add the subdirectory to the first RewriteCond, but all attempts have resulted in a 500 Internal Server Error.

I've read the library and did a search, but most pages I've seen are either rewrites for subdomain to x or [domain.net...] to [domain.net...] without a subdirectory.

This works for my root directory:

#RewriteCond %{HTTP_HOST} ^domain\.net [NC]
#RewriteRule (.*) [domain.net...]

But obviously it just loads up the index page when placed in the subdirectory. Any and all help is definetly appreciated.

jdMorgan

1:36 am on Feb 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




RewriteCond %{HTTP_HOST} ^domain\.net
RewriteRule ^subdirectory/(.*)$ http://www.domain.net/subdirectory/$1 [R=301,L]

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim