Netlify not support wildcard subdomain - deployment

In Netlify I have tried and even upgraded the paid plan with their community forums reference. But later found that they are not supporting wildcard subdomain configuration.
For the basic level subdomain with one-click app setup, Netlify is good. Except for wildcard domain it's a best to configure your frontend apps.

For the basic level subdomain with one click app setup Netlify is good. Except wildcard domain its a best to configure your frontend apps.

Related

Redirects on Google Cloud Run

I've got a clients site that uses Google Cloud Run and I need to implement some redirects as they have both www. and a non www. version of the site simultaneously.
https://www.example.com
https://example.com
I would like to setup a redirect so that it goes from www. to the non www. version. I know I can't do this at DNS level for this type of redirect so am looking at doing it at a server level. I've checked for documentation on this on Google Cloud run and can't seem to see anything relevant. I've never worked with a client site that uses cloud run before, but have a good idea of how I'd go about doing this on a website that uses Apache or Nginx.
Does anyone know if there is a specific file where I should be implementing redirects within the Cloud Run setup?
Thanks,
Adam
You should do this in the code. For example if you were using Python with Flask, you can implement it in your #app.before_request

Custom coded configurator on Cpanel Subdomain for existing Shopify marketplace

a. I have a Shopify shop ex: shop.com
b. The product configurator is a PHP built and its hosted on a server (https://zaorstudiofurniture.com/index.php?page=configurator)
c. How can I setup configurator.shop.com URL if my domain is hosted on Shopify?
You cannot run PHP code on Shopify. You can however set your DNS up so that your configurator App runs as a subdomain on zaorstudiofurniture.com. For example, you would run your shopify store as:
www.zaorstudiofurniture.com
and your configurator as:
config.zaorstudiofurniture.com
with simple DNS settings. Shopify has some DNS settings internal to their admin that is good for ensuring Shopify stores run on domains correctly, but no one really needs that unless they are total n00bs to Internet. Setting up your own DNS ensures you can run your PHP, your Shopify, email and any other services without too much trouble.

Where to "host" a Progressive Web App (PWA)?

Im just starting out diving into PWAs.
Where should a PWA being published?
Can it be published like any other javascript app on the web (as a simple URL)?
A PWA is like any other website. You can host it anywhere you can host a "regular" site, as long as it is served via HTTPS.
A PWA is made up of service workers, which can run in the background. To avoid tampering with service workers the specification of PWA requires it to be hosted over HTTPS.
So any hosts supporting HTTPS would be good enough for them.

yii2 remove backend/web and frontend/web from url

I am trying to change site url from http://localhost/yiiwebsite/backend/web/index.php url to http://localhost/yiiwebsite/admin and http://localhost/yiiwebsite/frontend/web/index.php url to http://localhost/yiiwebsite/.
Can anyone help me to do this.
It's described in official docs here.
Here is some basic info:
The application installed according to the above instructions should
work out of box with either an Apache HTTP server or an Nginx HTTP
server, on Windows, Mac OS X, or Linux running PHP 5.4 or higher. Yii
2.0 is also compatible with facebook's HHVM. However, there are some edge cases where HHVM behaves different than native PHP, so you have
to take some extra care when using HHVM.
On a production server, you may want to configure your Web server so
that the application can be accessed via the URL
http://www.example.com/index.php instead of
http://www.example.com/basic/web/index.php. Such configuration
requires pointing the document root of your Web server to the
basic/web folder. You may also want to hide index.php from the URL, as
described in the Routing and URL Creation section. In this subsection,
you'll learn how to configure your Apache or Nginx server to achieve
these goals.
By setting basic/web as the document root, you also prevent end users
from accessing your private application code and sensitive data files
that are stored in the sibling directories of basic/web. Denying
access to those other folders is a security improvement.
If your application will run in a shared hosting environment where you
do not have permission to modify its Web server configuration, you may
still adjust the structure of your application for better security.
Further configuration depends on chosen web server (Nginx / Apache), which is not even mentioned in the questoin. But both options are covered in official docs by the given link.
For shared hosting environment there is special section too.
And by the way this was asked before many times here on SO, just do a better research.

Facebook login - how to develop on both localhost and in production?

I am developing a website which uses the Facebook login. Now, I want to be able to get this to work both in my production environment, as well as in my development environment.
On Facebook, I can give ONE site url, which Facebook can redirect to. This worked great during my development phase, but now I want it both to work in production, but also while developing my solution.
I guess one way would be to run my application on the local IIS with my domain-navn and change my hosts file, but that can't seriously be the most easy solution!?
- What is the easiest way to get it to work in both environments?
Update: As of 2018 the path to this setting is now Products > Facebook Login > Settings > Client OAuth Settings the rest of this answer is still valid.
There is a better way. You just need to add valid callback URL's for your localhost to Settings > Advanced > OAuth Settings.
This method allows you still have your production website URL while allowing oauth from dev, staging, production, etc.
After I have worked with this for ~6 months, I have found a solution which works really well, based on the other two answers.
In Facebook I add two apps:
Production app
Dev app
Then, in my web.config app settings I have:
<!--Prod-->
<add key="_FacebookApiId" value="id"/>
<add key="_FacebookApiSecretId" value="secret_id"/>
<!--Dev-->
<add key="FacebookApiId" value="dev_id"/>
<add key="FacebookApiSecretId" value="dev_secret_id"/>
Which of course is read through a helper-class.
Then it works seamlessly on both production and localhost, and both myself and my team is happy.
I have the same problem.
The only solutions I have found are:
yes... edit the host file on your local machine: How to Test Facebook Connect Locally
create another Facebook app only for development purposes: Facebook Oauth on localhost for testing during development (the blog is about Rails but the solution to use different apps depending on the environment is still valid for other languages)
Facebook only allows localhost OAuth redirects when your app is in development mode. This means you can't run your application in production and perform local development tests.
Instead, you need to create a test variant of your app. Head to https://developers.facebook.com and view the dashboard for your production application. Click the drop-down menu at the top-left and choose Create Test App.
This populates a test application with almost the same settings as your production app. However, it gives you a new app ID and app secret, so you'll need to toggle these settings when running in development mode (as other answers suggest).
Here's some further info on test apps: https://developers.facebook.com/docs/apps/test-apps/
Following the advice in this answer, it will work if set the Mobile URL to be your development domain (ie. localhost) and the Site URL to be your production domain.
The updated way.
In the App Dashboard, choose your app and go to Products > Facebook
Login > Settings. Under the Client OAuth Settings, enter your redirect
URL in the Valid OAuth redirect URIs field for successful
authorization.
Go to https://developers.facebook.com/docs/facebook-login/web for more info.