How to use Wordpress and Django together - django

I host my Django site Wantbox.com on Dreamhost. I'd like to use Wordpress for the Wantbox blog and locate it here: http://wantbox.com/blog/
How do I configure Django to lay off "/blog/" so Wordpress can do it's thing? Right now, I have a catch-all url pattern which sends anything not specified to the homepage and this catch-all is catching "/blog/" and doing just that.
Thanks for your help!
UPDATE:
It's not necessary for Django data to be accessible by Wordpress or vica-versa. Also, I'm open to a Django-based blog solution, if it works as well as the tried-and-true Wordpress that I'm quite familiar with.

I found via Google a similar SO question here. The answer is to create an .htaccess file in the root of your new blog folder. In my case, the blog root directory is here: ~/wantbox.com/public/blog/
My .htaccess file in this directory has one line:
PassengerEnabled off
Now the url pattern http://wantbox.com/blog/ is ignored by Django and handled by Wordpress. Very nice.

Related

django redirect to subdomain with exact same url

I have a Django website accessible at codewithbishal.com. This is basically a django blog website and all the blog articles are accessible at codewithbishal.com/example/<path>
But now I want to completely restructure the website{such that it is accessible at blog.codewithbishal.com/<path>} and I do no want to lose the current SEO therefore I want to configure django redirect such that when someone launches codewithbishal.com/example/<path> through google search search result or directly through link, they are redirected to blog.codewithbishal.com/<path> instead of a 404 page and eventually google will start showing the new links instead of old once.
Update: Should I configure redirect through apache .htaccess?
You can use the Django redirects app. Just click the link and find the guide.

WordPress blog in Subdirectory of Django website on a CPanel Host

As I read articles and questions online, I believe it is possible; My main question is how to achieve this goal?
I have Django Website with some urls on my domain (I use Setup Python App plugin on CPanel). I can simply achieve this using a subdomain, but I want to run my WordPress blog on a subdirectory, but every url that is not registered in urls.py will raise an error.
What's the best way to reach this goal?
What are the steps that I need to take to reach it?
I will be more than greatful if you point me towards the right direction.
Thanks in advance.

SIteCore - multisite - displaying page from wrong site

We have a multisite SiteCore setup with 2 sites within the same .Net solution.
This works by setting the rootPath property on a Site Definition in web.config to limit the site to part of the SiteCore folder structure.
This works well apart from when pages are created with the same name as in the other site then it's serving content from the other site! We have inherited a fair bit of custom code in this solution form the other site so this may be the cause but dont know what Im looking for ...
Thanks
How are you referencing the sites? Do they each have their own host name? Do you have the "hostName" property set for the site node in the Site Defintion?
I will assume that you are not referring to them this way and instead, the sites are using the "virtualFolder" property. If both sites have the same default value of "/" for virtualFolder, attempting to get to either site will result in Sitecore rendering the first site that it matches on, which would be the site listed first.
Try putting the actual site name for "virtualFolder" and "physicalFolder" (e.g. "Site1" and "Site2", respectively). Then you can address your sites as http://yourserver.com/Site1 and http://yourserver.com/Site2. The "virtualFolder" will match first and render the correct site.
See Configuring Sites in the web.config File on SDN for additional information.
Hope this helps.
It turns out this is happening in this case because of a System alias that is redirecting for a subset of pages

keep media in base URL

So, I am looking for a solution to have images through the base website URL.
Example of image url:
www.website.com/image.jpg
Where the homepage lives at the url:
www.website.com/
I am using the django python web framework, and am aware this is a peculiar, if not just bad idea, but my client has linked several hundred images to their base URL in the above format, and refuses to change the existing links.
I know this is a vague question, but I can't seem to find anything relevant. Do I just set the media url to the same as the website?
Why don't you just configure your web server to rewrite the paths?
You could also configure it using an alternate host, assets.example.com for example and serve everything from there. Then you could rewrite all requests going at www.website.com to assets.example.com.

Migrating from wordpress to django without losing pagerank

I have got a blog in wordpress (www.ashwinm.com) which i am looking to migrate to django as i am very much impressed with it. Is there any way so that i can migrate to django without losing my current pagerank (which is 3)?
I don't mind losing all current contents of this blog as it is too old.
You could take a look at something like django-wordpress. That would allow you to keep your current content in the existing wordpress DB (read-only) and continue to develop other portions of the site with Django.
If you have a high pagerank, that is probably because you have content and the content is linked to by other people. You should try to keep that content in some form (it doesn't have to be exactly the same form), or at least ensure that every URL that is being linked to redirects to something useful. No one who follows a previously valid link to your website should get a 404.
Your content and your inbound links together are responsible for your pagerank, so if you let both die then you're back at square one, regardless of what web application framework you are using.
If I were doing it I would probably set up the new blog with Django and import the data manually. Or, if there is simply way too much data, I could move the Wordpress server to be served from a directory such as /archive and instruct my webserver to 301 redirect all of the old Wordpress blog entry URLs to the new directory. You would have to continue to maintain the Wordpress installation to some degree, but you would be 100% certain to keep all of your pagerank.