Dennis Spohr

Use other domain to show sub-page

Recommended Posts

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 Peter Knight
      I have a single Processwire install with two domains pointing to it.
      There's
      in-progress.com which is the "proper domain" and won't be live for a few months mini-project.com which needs to go live immediately but just point to a sub-page Is there a way with .htaccess to know when the site is being accessed through mini-project.com, keep that address is the browser bar and redirect to mini-project.com/project-home/
      To give a little context, a part of the in-progress needs to be accessible immediately and we've registered that temporary mini-project.com and pointed it at the same site.
      The key here is to only do that redirect when mini-project.com is the source request. Otherwise I guess I'd use Jumplinks etc
       
       
    • By awesomolocity
      Alright. So I'm converting a site I already have to Processwire (really enjoying it so far!). I wanted to convert the previous tables that I had data in to Processwire pages. But I'm wondering what the optimal way to structure pages would be.
       
      So basically, I have three main tables.
      Users (and all accompanying information)
      Items (and all accompanying information)
      Aquariums (each user only has 1 aquarium. Currently, user_id is a FK)
      Fish (type of item. Aquariums may have multiple fish)
      Aqua_settings (Things like lightness, temperature, etc)
       
      So in my current setup, there are a lot of Foreign Keys. I could accomplish essentially the same thing by using the Page Reference field.
      Alternatively, I could make fish and aqua_settings both be children of Aquarium. I could differentiate by doing $aquarium->children('template=aqua_settings'); or something.
       
      So my question is...should I be using the Page Reference field or structuring the pages as children? (Or are both equally fine depending on how I want to go about doing things)
    • By sirhc
      Hi all,
      Im looking for a selector that gets the pages added a specific time frame (eg. from yesterday 9:00pm to today 9:00pm).
      Is there a existing selector im missing or does someone now a good solution for this?
      Thanks in advance .
    • By Barry
      I'm trying to direct all pages from their www and http versions to their non www https versions but I'm experiencing some really strange redirecting behaviour instead.
      When I uncomment the http to https lines in the htaccess, I get a too many redirects error on my site I thought that Processwire by default redirected from www to non www? When I apply the following line after the Processwire directives
      RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] The redirecting seems to work fine but for some reason many of the pages redirect to the homepage.
      I don't know if its a factor but I have jumplinks and multi-language installed and running.
      I've removed all custom rules from the htaccess just so that people see the pages they click on from search engines, but I'm hoping this can be resolves quick. Ideas?
    • By mr-fan
      Like title says i've some domains with umlauts öäüß and i'd like to redirect them to the non umlaut version
      example:
      http://my-domän.de to http://my-domaein.de
      i've somethings like this in my htacess:
      ##redirect umlautdomain (not my domain) RewriteCond %{HTTP_HOST} ^xn--mhldorf-nsb.d$ [NC] RewriteRule ^(.*)$ http://muehldorf.de//$1 [R=301,L] in my config.php i only have muehldorf.de in my hosts list...
      is there something that i've misunderstood? so far it doesn't work....but may the htaccess rules take some time to exicute...i tried since about an hour some different rules.
      regards mr-fan