homepage Welcome to WebmasterWorld Guest from 54.198.130.203
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Help needed in URL rewrite to a sub directory
help needed in URL rewrite to navigate to a diff subdirectory
itsraghz




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

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.

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved