Dennis Spohr

Use other domain to show sub-page

3 posts in this topic

Hi all,

this is my first post here - so let me say first: I love ProcessWire! :rolleyes:

I have the following scenario:

On my website users will be able to create their own site. This site is a page (in this case 'theirsite'): "www.mydomain.com/theirsite"

Now I want that they can use their own domain. So this domain needs to load their page:

"www.theirdomain.com" goes to "www.mydomain.com/theirsite" but while showing the first domain in the browser.

I'm trying to archive this with an htaccess entry:

RewriteCond %{HTTP_HOST} www\.retuschierenlernen\.de
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?it=retuschierenlernen/$1 [L,QSA]

I get the following error, because it loads the my main site, not the page of my user:

Warning: file_put_contents(/www/mysite/test/html/site/assets/cache/FileCompiler/site/templates/public-site.php): failed to open stream: Permission denied in /www/mysite/test/html/wire/core/FileCompiler.php on line 327

Thanks!
Dennis

Share this post


Link to post
Share on other sites

Hi Christophe,

yes I saw the module. But not sure if it solves my problem, especially because it doesn't seem to be compatible with my ProcessWire version. I get some errors after installation.

I use PW 3.0.42.

Thanks,
Dennis

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Cole
      Long time listener, first time caller...

      I have been working with ProcessWire for some time now and it has been amazing, my go to CMS. Previously my workflow had a local development setup through MAMP using an address like http://localhost:8888/websites/example.com.
      I have recently changed this in preference of  http://dev.example.com, that way I do not need to disable the .htaccess forward from non-www to www to develop locally. My .htaccess forward is setup like:

        RewriteCond %{HTTP_HOST} !^dev\. [NC]
        RewriteCond %{HTTP_HOST} !^www\. [NC]
        RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
      This works on all sites that are still using ProcessWire 2.5, however on sites using 2.8 and 3.0 I am getting a 403 Forbidden error. After reading through the forum posts related to 403 errors I have not been successful in finding a solution for my issue. Has anyone experienced this or can assist? Thank you very much in advance, the forum community has been so helpful I have never needed to post until now.
    • By j00st
      Hi Everyone!

      Wondering if the community can help me out on the following issue I'm struggling with;
      I'm using a Page titled Tags, with children Pages for separate Tags (a Tag, maybe obvious, but still...) 
      These tags are being used as...tags! From a dropdown on the article-page in the CMS. Works like a charm. But...

      I actually want to use these tags as cross-reference as well. Basically I want to make a page with all tags on it,
      and for each tag have a list with all the Pages it's connected to (and preferably even pull content from those pages).
      Might be I overlooked a previous post on this subject, or that there's a Module for these kind of things,
      but since I couldn't find anything so far, I thought I'd try my luck here! 
      Ideas, options, solutions, suggestions...all welcome!
      Thanks!
    • By didhavn
      Hey All.
      I need some help with a problem relating to users permissions to create pages and selectively remove a "new" button.
      I have a container page called "Sektionen" to keep Sektions of pages. These sections are created within different pages via a pagetable field. Now I want to change the way new sections can be created in a way that they can ONLY be created via the pagetable-field, not via the "new" button in the pages tree (see screenshot - this button should be removed).
      I think I can not change this in the templates settings and wanted to ask if anybody of you has an idea how to accomplish that?
      Thanks a lot!

    • By jsantari
      Trying to do some ajax calls to an api  named somedomain.com/xapi/index.php using intercoolerjs in my home page. I'm trying to make calls like this in intercoolerjs. somedomain.com/xapi/controller/method. Looked through a bunch of the posts but nothing seems to match what I am trying to do. Is there a change I can make to the htaccess file  to get this to work? Anyone have a suggestion on this or is there a better way to handle the api?
    • By hellomoto
      I have web hosting with the following .htaccess en root, to point it to a subdirectory "audino.us", wherein I have PW installed:
      RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?something.com$ RewriteCond %{REQUEST_URI} !^/something.com/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /audino.us/$1 RewriteCond %{HTTP_HOST} ^(www.)?something.com$ RewriteRule ^(/)?$ something.com/index.php [L] RewriteCond %{HTTP_HOST} ^(www.)?something.com$ RewriteRule ^(/)?$ something.com [L] However when I go to audino.us/pw to access the admin, it becomes audino.us/audino.us/pw, and doesn't allow me to log in. How do I render the above to be recursive (?), i.e., to apply to all subordinate URLs? Is this to be done within the .htaccess in /audino.us, or in the root .htaccess above? Please help, I can't log in. Thanks much.