开发者

Static Website - Converting to Dynamic, need to import information from database on different host

This seems really complicated to ask about so I hope someone can help:

We have a long time running static website held with a hosting company that provide PHP, Ruby-on-Rails and Drupal/Joomla support. A littl开发者_如何学Ce limited I know but we got reasonably decent search engine rankings and didn't want them to drop. We have two much more recently created sites on another host written in Python/Django.

The original site is now too big to handle statically and we want to create a more dynamic site in its place without changing servers/webhosts. The data we want to provide the 'new' dynamic site is from the same database providing the Django sites.

What is the best solution to build the new site with? Is it better to create PHP pages that connect to the database on the other host? Ruby-on-rails seems like a very fast development environment not too dissimilar to Django, would we be able to fetch data from the existing databases into a rails site and use similar urls to our old static pages?


PHP, Django and RoR are capable of doing this, it's a matter of what do you like and feel more comfortable with. I'm PHP biased, but people tend to like more the others two.

URLs will change, some of them, as you'll have to handle some UIDs to fetch data from the database, unless you can assure pages names to be unique. Maybe /news/example will change to /news/example-1 or /news/1/example. Bur if example is unique inside the news section then you could do /news/example without altering the URL.

Think twice before starting coding anything, it'll save you time and a lot of re-coding.


The better solution here is knowing that a change in server/hosting (IP change that is) will not have any or little effect on SEO. Read this, this and this. Hopefully they convince you that changing hosts will not effect your page rank etc.

I would advice you to change to a new server and build your new site there instead of messing around with having a remote database. I would use PHP to do this, the same thing can be achieved with RoR, but PHP is my preference.


If you have people around who know and are comfortable with Python/Django, I would rebuild using that combination. There is no reason not to move the serving over the host that already has the database, and that will reduce complexity and increase speed.

While I have a personal bias toward PHP, I would argue that it is better to have all you systems running on a consistent platform. I use Python and Ruby on personal projects, but I stick to PHP at work to keep everything consistent.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜