Forums

existing domain folder

Am just setting up a new hacker account. We have a domain that is currently a Word Press Site. We're trying to put the pythonanywhere site in a folder of the Word Press Site. Is this possible? Looked through the forum, and it seems to be mostly if you are starting a brand new domain. Thanks, John.

It's not something you can set up inside PythonAnywhere. When a request is made to www.yourwordpressite.com, then it will be routed to the server that is serving your WordPress site, regardless of the folder specified in the URL. So in order to make that folder contain your PythonAnywhere stuff, you'd need to tell your WordPress server to somehow get the data from our site and then serve it back to the browser. That would be hard.

An easier solution would probably be to make the URL on your WordPress site redirect to the PythonAnywhere site.

There's another option, if you just need to make PA site's content seem as served under the URL www.yourWPsite.com/pa-folder/, try the good old frameset.

Like this index.html (or even .php if you'll need some URL processing there):

<html>
 <frameset rows="100%">
  <frame name="main" src="//www.yourPAsite.com/path">
 </frameset>
</html>

Also you may have to play with target attributes of links, like adding target='_blank' to external anchors...