How do I host a wordpress blog from a domain pointed to by an application hosted on the Google engine?

I have a Python web application hosted on a Google App Engine, with .com aimed at an App Engine application. I would like to start a Wordpress blog at mydomain.com/blog. Since Wordpress works in PHP, I think it would be easier to host a Wordpress blog on my other web hosting account using cpanel and change some domain pointer. What is the best way to achieve this?

I believe that setting a DNS A Name record for "blog" to point to my other web hosting account will create blog.mydomain.com and solve this. But is there a way for mydomain.com/blog to point to a different web hosting account on a Wordpress blog? Thank.

+5
source share
2 answers

A simple solution would be to create an A post that you mentioned in your question, and then put index.html in the blog / directory in the application engine, which contains

window.location = "http://blog.mydomain.com"

as the onload function of the body tag.

Another solution is to add a .htaccess file that redirects http://www.mydomain.com/blog to http://blog.mydomain.com .

Edit: as indicated in the comment below, appengine does not support this method. I leave this so that he can help someone who has a similar question, not related to the application engine.

A similar redirect will be required for a domain without www in front of it.

Edit for a better htaccess example:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.com$
RewriteRule ^blog/(.*) http://blog.mydomain.com/$1 [R=301,L]

htaccess, , , -, .

+1

, renab: Wordpress Apache ( http-) - App Engine URL-, / ( ).

Apache .

+4

All Articles