Posting on one domain, automaticly published on another?

6 replies
I am planing to create website for holiday rentals advertising on few country code top level domains .de, it. fr, etc. It would be same website just translated for specified country.
Is it possible when user register and post his accommodation on one domain to automaticly be registered and his acommodation published on all domains. He could then log in on any domain de. ,fr. it. etc. I see many big companies doing the same, they create their website on many country domains, and if im registered to com. domain i can still log in in de. domain and update my accommodation.
To get that job done is that big project or not, would it be expensive?
#automaticly #domain #posting #published
  • Profile picture of the author ryanormrod
    Hello.

    You haven't mentioned which framework you have chosen to build your website, but it sounds like you might be out of your depth when it comes to coding one.

    What I recommend you do is plan how you will build your website, then once you have chosen a platform, somebody could provide you with specific instructions to help.

    It's important to have chosen a framework, because for example, if you've chosen Wordpress then I could say that you can set up a Multisite Network and map domains.

    However, at this point I can't suggest anything because I don't know what your plans are.
    {{ DiscussionBoard.errors[10929520].message }}
    • Profile picture of the author albertzd
      Hello, its php mvc framework. Can u help with this?
      Thank you
      {{ DiscussionBoard.errors[10930537].message }}
      • Profile picture of the author ryanormrod
        What you might need to do is a mixture of htaccess and $_SERVER.

        So if the server domain matches .fr then set a $_SERVER key/val in the HTACCESS

        See SetEnv mod_env - Apache HTTP Server Version 2.2
        And SetEnvIf https://httpd.apache.org/docs/curren..._setenvif.html


        An example (not tested)....

        Login to your web server and find the .htaccess file. Clone this file and name it .htaccess.bak.

        Then in your .htaccess file add the following:

        SetEnv SITE_LANGUAGE en

        # The domain is french .fr
        SetEnvIf Host "\.fr$" SITE_LANGUAGE=fr

        # The url has /fr
        SetEnvIf Request_URI "^/fr/" SITE_LANGUAGE=fr

        Then you can use $_SERVER['SITE_LANGUAGE']) === 'fr' to choose the language in php (but be sure to use a switch statement)

        But if it's too difficult then set up a forwarder on your domain that redirects yoursite.fr to yoursite.com/fr then it will work (for now). Has SEO disadvantages however.

        You will also need to handle your domains.

        However, if somebody is French and posts their accommodation in French, but it also appears on the English website. Would this make sense for your English speaking viewer?

        Instead why not keep them separate?
        So you can have the same site multiple times and make the experience less confusing.

        Just clone your database and then you can use the $_SERVER['SITE_LANGUAGE'] variable and select your French DB.

        Otherwise you're going to have different languages appearing on the same site regardless of where they are and what language they're speaking. This is not exactly targeted.

        However, it still depends on what Framework is being used. It might need a lot of custom work if somebody created the MVC themselves.
        {{ DiscussionBoard.errors[10930642].message }}
  • Profile picture of the author albertzd
    Thank you for your answer. Im not programmer so i dont understand that language. When posting an apartment on website u have option to put description on each language, so if somebody write description on french language it will appear on french domain. Im just wondering will my programmer have to work a lot to make this system or it is simple work and not so expensive
    {{ DiscussionBoard.errors[10930650].message }}
    • Profile picture of the author ryanormrod
      I would say it would take from 2 to 4 hours depending on the experience of your developer and how many strings (lines of text) there are in total. Also depends on how the current translations are handled. Definitely not a long project as the site that you have sent to me in my inbox appears to have only a small number of pages.

      If your framework does not support multiple domains, this will mean additional work will be required (otherwise you'll be loading a site using http://www.yoursite.fr but all of the assets urls will be pointing to (http://www.yoursite.com) so users will be eventually end up at an English version of your website. So if multiple domain support does not exist, adding it can take longer than the entire website takes to complete, due to the complexity of the changes, we're going beyond the norm and it's then a more bespoke project.

      Timing in web development is really per project. It could be that it can be achieved really quickly because the mechanisms are already in place. Sorry I can't be more precise, but I can not see the code or identify the framework.
      {{ DiscussionBoard.errors[10930780].message }}
      • Profile picture of the author newbim
        I'm pretty new to coding, so am wondering if it would be possible to have one webform on a seperate domain that posts on details to form handlers on each site's domain, which in turn would translate it and upload it to it's respective database. I'm probably way off, but just a thought.
        Signature
        If what I said helps, let me know, throw me a 'thanks'.
        {{ DiscussionBoard.errors[10935755].message }}

Trending Topics