• Hello,

    I really hope I can get some help with this one. I have a wp site setup (reppiks.com) and recently setup a single page as a sub domain. (beats.reppiks.com) What I am having a problem with is I now want to add another page under that dubdomain. ex:beats.reppiks.com/producer1, beats.reppiks.com/producer2, etc

    I have successfully setup the sub domain by copying the index.php file from my wordpress installation directory and added the following, $_GET[‘page_id’]=XXX; before all other coding, and placed that file in my sub-domain root. I also had to change this part;

    require(‘./blog/wp-blog-header.php’);

    to

    require(‘../blog/wp-blog-header.php’);

    That works wonderfully. The problem I’m having occurs when I want to add a sub-directory under that sub-doamin. I added an index.php file the same way as before, to have that page load up at that url. The theme loads up fine but I get a 404 error. This tells me it’s seeing the index.php file but not loading the page. (I also tested a simple html file and it loads fine too) I believe the problem is my method only works the way I want/expect only with dub-domains. I’ve noticed if I go to the sub domain’s actual directory, (reppiks.com/beat-store/) the url changes to the actual url of the page I have set in the index.php file. (reppiks.com/beats/) I believe this is where the problem lies. Maybe it’s trying to load the wordpress url address but under my sub-domain which wouldn’t exist.
    Is there different process if I wanted a “custom” sub-directory to display a specific page, but keep the url of that sub-directory, not the url set for the page within wordpress?
    Ex: domainname.com/pagename is actual wordpress url but want to display it under the url and subdirectory domainname.com/newurl
    If there is a way to do that perhaps implementing that method would solve my issue.

    I also want to implement this method on another site I’m setting up because I will be running a very specific membership script witch manages access to a page by it’s directory and it’s sub-directories. I believe if I can get this method to work I can use so I won’t have to setup 2 wp sites, because I don’t want to lockout the whole site.

  • The topic ‘Subdomains with subdirectories’ is closed to new replies.