Thanks in advance for your answers I want to make google cloud storage links (storage.googleapis.com) to redirect to my own domain I've achieved that so far but when I add something like a picture that is hosted in one of my servers which is linked to this domain the google cloud storage link does not function well, explanaition :
For example my domain name example.com, which is linked to my google cloud account with this link https://storage.googleapis.com/example-test/example.html if I add anything after that like https://storage.googleapis.com/example-test/example.html#gOAdv.png it only redirect to the main domain example.com
This is the content of my example.html:
<meta http-equiv="refresh"content="0; url=http://myexampledomain.com/">
Note when I remove the # from the link (https://storage.googleapis.com/example-test/example.html#gOAdv.png)
it shows this error:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Details>No such object: example-test/example.html/gOAdv.png</Details>
</Error>
hello everyone i ve found the answer it was my way of thinking
<meta http-equiv="refresh"content="0; url=http://myexampledomain.com/">
this line was short and bad i needed to code it via another language to make it work.
Thanks to all.
Related
I am currently working on a 1 page HTML app that uses URL parameters to do an API call. the URL parameters are set and used in QR codes so its necessary that they are able to change dynamically. A example URL would be something like app.com/index.html/?environment=demo&location=Kiosk
I currently have this app deployed in AWS Amplify, but I cant get other keywords to chain together. I have the following redirects in place:
These redirects make sure that every URL parameter I pass in the link works EXCEPT some keywords like the "location" keyword, next to some others. Using this keyword as a URL param gives a 502 server error, or if the redirects are not used an access denied error.
does anyone know how to get the location keyword to work? Thanks in advance!
You should be able to use a single rule that will forward everything to index.html EXCEPT urls with a "file extension" from the list below. That lets all your links work, but assets like images, fonts, code will pass through.
Doc for: Using Redirects - Single Page Apps
</^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|woff2|ttf|map|json)$)([^.]+$)/>
If I have added a property as https://example.com, and then decide I would rather add the whole domain using TXT, should I then remove the url-based property please?
It's not really needed !
Personnaly I kept both of them !
Like that, you can see more details datas : In the url-based you see only the subdomain concerned; and with the domain using TXT you see the all domain.
Sometime could be usefull to have also an or some subdomnains + the global..
I am using the Google GTMAppAuth with my swift project for authorisation. The thing is, I don't know what to put as a Rediret URL. I couldn't find anything on stack or anywhere else about what it is supposed to be. I am new to the google api so help would be appreciated.
After Successful creation of oauth2 credentials (https://console.developers.google.com/projectselector/apis/credentials) you will get client ID for your project.
Follow the below instructions...
kRedirectURI is reverse DNS notation form of the client ID. For example, if the client ID is YOUR_CLIENT.apps.googleusercontent.com, the reverse DNS notation would be com.googleusercontent.apps.YOUR_CLIENT. A path component is added resulting in com.googleusercontent.apps.YOUR_CLIENT:/oauthredirect.
Finally, open Info.plist and fully expand "URL types" (a.k.a. "CFBundleURLTypes") and replace com.googleusercontent.apps.YOUR_CLIENT with the reverse DNS notation form of your client id (not including the :/oauthredirect path component).
Once you have made those three changes, the sample should be ready to try with your new OAuth client.
I've been looking for a method with DNS to redirect my domain's subdomain e.g http://server.my-domain.com to https://discordapp.com/invite/server
As i found the answer of this question, i'd love to share it with all of you,
Create a CNAME on your domain named server: (or any other name you want)
Target the CNAME to: discord.gg.opts-slash.INVITECODE.redirect.center but change the INVITECODE to your server invite code
Save it and you are good to go!
Please note that:
If you want to use it for another method other than discord please remember:
.opts-slash means / for example you have http://example.com/123, to redirect your http://example.my-domain.com/ to http://example.com/123 type in the CNAME example.com.opts-slash.123.redirect.center and your CNAME name to example.
As i couldn't get it to work redirecting it directly through a CNAME, i had success by creating a simple netlify app which is just redirecting via JS:
Create index.html with the following content:
<html>
<head>
<title>Discord redirect</title>
</head>
<body>
<script>
window.location.replace("https://discord.com/invite/INVITECODE");
</script>
</body>
</html>
Place the index.html inside a folder and upload it to netlify
You'll get a unique name, such as eloquent-noyce-x00xx0
Set a CNAME to your app with eloquent-noyce-x00xx0.netlify.app. (last dot is important!)
Set your mydiscord.mydomain.com as custom domain in netlify
That's it, visit mydiscord.mydomain.com and it'll redirect you
For me redirect like previous answer doesn't work.
Free (minus the domain name) and easy solution is to use Amazon Web Services. Create an AWS account and follow this guide:
https://kennbrodhagen.net/2016/04/02/how-to-return-302-using-api-gateway-lambda/
Then use Route53 to create a CNAME to redirect to the API Gateway:
How to CNAME to Amazon API Gateway Endpoint
1) Create a Discord invite that never expires.
2) Use the .GG URL to find the .COM URL. You will be redirected in the browser when you paste the .GG URL into the browser.
https://discord.gg/abc12de (redirected to) -> https://discordapp.com/invite/abc12de
Note: abc12de (example) stays the same between the two URLs.
3) In your GoDaddy domain, scroll down and to the right. Select Forwarding.
4) FORWARD TO: (Drop down) https:// (fill in box) discordapp.com/invite/abc12de <- Note: remove https from the original URL.
5) FORWARD TYPE: Permanent (301)
6) SETTINGS: Forward Only
7) Save and wait.
8) You'll notice a new A Record is created with a TTL of 600 seconds. This shows your settings have taken and should now work.
URL with additional info: https://www.godaddy.com/help/forward-my-domain-12123
This worked for me:
Create a "A" DNS Record with name "discord" pointing to 8.8.8.8
Create a page rule of url forwarding to your server invite called "discord.mydomain.com"
The CNAME way doesn't work!
It works for me thanks full tutorial in case someone understood it.
This is for CloudFlare
Created Add Record "A"
this type "A" must contain in Name: "Name you want for the sub domain", and in IPv4 address they must place "8.8.8.8", Proxy status activated.
IMG Add Record
Then they go to "Rules"
Here they add a Create a new rule, and place the following data in URL: "yoursubdomanin.yourdomain.com", luen in Then the settings are: Select "Forwarding URL", then in Select status code: Select "301 - Permanent Redirect"
in Enter destination URL (required) you put the url of the Discord invitation: "https://discord.gg/yourInviteCode".
IMG Rules
That's how it works, in case it doesn't load you because you have already tried many methods with "discord.yourdomain.com", try another subdomain while the other one is reactivated or try from another device, example of another dub domain "discord1. yourdomain.com".
That's bye :D
I created my first bucket, and when trying to access it by typing storage.googleapis.com/mybucket, I get the following in my browser. I am totally ignorant in respect to all things code, and only would like to be able to solve this issue in order to be able to use a WordPress plugin, WP2Cloud, which integrates Google Cloud Storage with WordPress. Here's what's in my browser:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
</Error
Any help will be appreciated!
You can not use storage.googleapis.com/mybucket or mybucket.storage.googleapis.com directly from browser. You need to pass GoogleAccessId,Expires, Signature.
If you want to use from browser you need to use Signed URLs
https://developers.google.com/storage/docs/accesscontrol#Signed-URLs
example of Signed-URLs:
http://mybucket.storage.googleapis.com/testdata.txt?GoogleAccessId=1234567890123#developer.gserviceaccount.com&Expires=1331155464&Signature=BClz9e4UA2MRRDX62TPd8sNpUCxVsqUDG3YGPWvPcwN%2BmWBPqwgUYcOSszCPlgWREeF7oPGowkeKk7J4WApzkzxERdOQmAdrvshKSzUHg8Jqp1lw9tbiJfE2ExdOOIoJVmGLoDeAGnfzCd4fTsWcLbal9sFpqXsQI8IQi1493mw%3D