Welcome to WebmasterWorld Guest from 54.145.176.120

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Help needed in URL rewrite to a sub directory

help needed in URL rewrite to navigate to a diff subdirectory

   
5:42 pm on Oct 20, 2013 (gmt 0)

5+ Year Member



Hi,

I had hosted my Drupal CMS blog with the URL as http://example.com/blog.

Being a Java based hosting I have recently taken with a diff hosting provider, he has a different directory structure to keep all the PHP related files into 'php' directory of my user directory. Hence, I had to move my 'blog' directory under 'php' thereby forced to rewrite / redirect my URLs

from :

http://example.com/blog/blah-blah/123/blah


to :

http://php.example.com/blog/blah-blah/123/blah


I had tried the following rules in my httpd.conf.


RewriteRule example.com/blog/(.*) php.example.com/blog/$1 [NC,L] # Prefix a "php." for the blog
#RewriteRule example.com/blog/(.*)?$ php.example.com/blog/$1 [NC,L]

#RewriteRule example.com/blog/(.+)?$ php.example.com/blog/$1 [NC,L]

#RewriteRule example.com/blog/([a-zA-Z0-9-\/]+)$ php.example.com/blog/$1 [NC,L]


But it only redirects my request to the main blog directory ->
http://example.com/blog
to
http://php.example.com/blog
. But not to the other and actual URL of blog entries (like the one I mentioned above).

Any pointers on what I am missing?

Thanks,
Raghavan alias Saravanan M.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month