homepage Welcome to WebmasterWorld Guest from 54.211.95.201
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Content Management
Forum Library, Charter, Moderators: ergophobe

Content Management Forum

    
Moving a site to folder in another site
rag_gupta




msg:4648815
 5:28 am on Feb 25, 2014 (gmt 0)

I've a site www.example.com which I want to move to existing site so that it'd look like : www.existingsite.com/example/


So www.example.com/about.htm will look like www.existingsite.com/example/about.htm


I can't seem to find proper procedure to do it. Mine is Drupal site.

What is the right way?

 

GoNC




msg:4650578
 12:06 am on Mar 3, 2014 (gmt 0)

It depends on the server that the existing site is on. If it allows you to park a domain on a subdirectory, then create:

example.existingsite.com

Then park example.com on it.

The only other way I know to do this requires that you keep a hosting account for example.com, then use .htaccess to redirect everything. Something like:

RewriteEngine on
RewriteRule ^(.*)$ http://www.existingsite.com/example/$1 [R=301,QSA,L]

(That's not tested, I just typed it for this example, so beware any typos)

[edited by: phranque at 7:35 am (utc) on Mar 3, 2014]
[edit reason] unlinked url [/edit]

rag_gupta




msg:4650618
 3:46 am on Mar 3, 2014 (gmt 0)

I don't want to use 301 or redirects. I will directly copy the contents of my site into www.existingsite.com/example. Only that this example.com is Drupal based dynamic site with it's own .htaccess

GoNC




msg:4650622
 4:03 am on Mar 3, 2014 (gmt 0)

If you mean that existingsite.com/example will dynamically show the same thing as example.com at all times, then the best option is to park the example.com domain on top of example.existingsite.com.

If that doesn't work, and you don't want to use 301, you could always use .htaccess to proxy the new site, if the server allows it. I haven't done this in a LONG time, but I think it's:

RewriteEngine on
RewriteRule ^(.*)$ http:_www_existingsite_com/example/$1 [P,QSA,L]

Note that this forum changed the link in my example to [existingsite.com], not me. I replaced the // and . with _ to make it format properly.

If you need something else that's more specific to Drupal, sorry, but that's not my expertise. I have very little experience with template programs.

lucy24




msg:4650666
 8:05 am on Mar 3, 2014 (gmt 0)

I've a site www.example.com which I want to move to existing site so that it'd look like : www.existingsite.com/example/

What, exactly, do you mean by "look like"? This is important.

(a) you're moving the site to a different physical directory, but you want it to keep the old URLs
(b) you're changing all URLs of the old site to a new form, whether or not you're physically moving any files

rag_gupta




msg:4650670
 8:22 am on Mar 3, 2014 (gmt 0)

Lucy moving means not at all redirecting( using 301 or so). I simply want to place a new Drupal based site within www.existingsite.com/example where www.existingsite.com is already a Joomla site. So the example folder will contain Drupal's .htaccess file plus it's own index.php and other usual stuff.

ergophobe




msg:4650788
 7:52 pm on Mar 3, 2014 (gmt 0)

There's no real problem with that. The only thing is that both Joomla and Drupal work by rewriting all requests that are not to a file or directory so that they call the index.php file in site root.

So the only thing you really have to do is
- Install drupal in the /example directory
- set up your Joomla .htaccess so that it doesn't rewrite any requests to the /example/.* or /example$

The second bit is important, otherwise if you have a Drupal URL alias like

www.existingsite.com/example/my-page

Since it is not a file or directory, Joomla will try to serve that page if you don't do step two.

By the way - if you can migrate data, it might be worth it. It's enough hassle to maintain one CMS. Maintaining two is just that much more work. If I could, I'd import one into the other.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Content Management
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