Welcome to WebmasterWorld Guest from

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


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 :


to :


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 ->
. But not to the other and actual URL of blog entries (like the one I mentioned above).

Any pointers on what I am missing?

Raghavan alias Saravanan M.

Featured Threads

Hot Threads This Week

Hot Threads This Month