My website is adding the home path to the address in the href - xhtml

My website is www.massasestefania.com.br
If you put the mouse over the link "Massas Estefania" on the end of the page you will see that the website is adding "www.massasestefania.com.br/" to the facebook address
My code is correct:
Massas Estefania
but the generated path is:
www.massasestefania.com.br/www.facebook.com/Massas-Estefania-1976106245948939/
Anyone to help me to fix it?

www.facebook.com/Massas-Estefania-1976106245948939/ is not a valid URL.
www.massasestefania.com.br is not a valid URL.
https://www.facebook.com/Massas-Estefania-1976106245948939/ is a valid URL.
http://www.massasestefania.com.br/ is a valid URL.
URLs must start either with https:// or http://. Browsers will always add anything else to the existing/current URL for the request.

Related

Response.Redirect not redirecting properly

I have this site lets call it www.mysite.com I use the sight to show users some images. for example : user will request an image as below(Encrypted of course)
for example mysite.com/download.aspxid?123123admaodko39032l2k
mysite.com/content/images/1.jpg (After Encryption)
The problem I am having is that once I do a Response.Redirect("mysite.com/content/images/1.jpg",false) after unencrypting the url the url I am directed to is
mysite.com/mysite.com/content/images/1.jpg
notice how mysite.com is repeated twice.
I am not sure if any trick is done from the IIS configuration.
Remove mysite.com from the url.
Response.Redirect("content/images/1.jpg",false)

linkedin : Invalid redirect_uri. This value must match a URL registered with the API Key

I am using 'omniauth-linkedin-oauth2'.
When I am login with linkedin then I am getting this error
Invalid redirect_uri. This value must match a URL registered with the API Key.
This is my settings:
Went back to LinkedIn developer site (https://www.linkedin.com/secure/developer ) to check my setting again. Everything matches API Key, Secret Key and OAuth 2.0 Redirect URLs.
Searched web looking for some clues. Couldn’t find a one. Crazy issue:
Then I saw that in the URL Owin was appending some extra string to the redirect_uri “signin-linkedin”. When I decoded the URL I saw this http://localhost:54307/signin-linkedin . I took this URL and placed it in the OAuth 2.0 Redirect URLs field in the LinkedIn developer site.
This link is helpful for me
https://naveengopisetty.wordpress.com/2014/09/15/linkedin-oauth-2-0-issue-invalid-redirect_uri-this-value-must-match-a-url-registered-with-the-api-key/
You can just look in url that you are getting that error message on.
eg. if you are using python's social auth the url would look like this:
https://www.linkedin.com/uas/oauth2/authorization?scope=r_basicprofile+r_emailaddress&state=XXXXXX&redirect_uri=http://example.com.au/sa/complete/linkedin-oauth2/&response_type=code&client_id=YYYYYYY
so you would use this part of the above url for the redirect url
http://example.com/sa/complete/linkedin-oauth2/
please check your redirect_url. for my case I see like this.
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=77k93y0w31zaey&redirect_uri=http%3A%2F%2Flocalhost%3A1729%2Fsignin-linkedin&scope=r_basicprofile%2Cr_emailaddress&state=nhAC-nR-CgEwO3XS2ezANhuPBMz-IUmLPJYgGHlZvZ8B1pCfsGBU0PR0dZ5XxE4zbyeI0RLcKByqPLKkgQdqMm4s6DjFYqMCEehYA2iWT9MfioEHjPXGCt2USxUTF0wKBpflCUjG5URVlJa3qI7U3ydFOErZ4Hhnr9SVmKdf1bithYfbOqBx345o8LQLexbddQ687vP6y0szrIyCM6FHip1tCpOY3Hgg5FJQEFH1mCJ_yLunD5vDUN4VVfkQbcjk
for this I add the url for OAuth 2.0 Authorized Redirect URLs:
http://localhost:1729/signin-linkedin
where http://localhost:1729 =base url and
signin-linkedin = the string which add after base url
One more solution is to just verify the client_id you've been using the whole time..because with every update in the list of redirect_uri, the client_id gets updated.
Worth mentioning when one uses libraries to handle oauth: some libraries fail to care about the protocol that is used (or at least require further parametrization). Eg, I gave Linkedin https://example/callback as oauth2 url, but the library sent the request with http://example/callback as parameter.
I had this when trying to authorise from a zurb Reveal modal popup. In my case, the issue was the URL for the page that was being displayed in the popup was not in my OAuth2 Redirect URLs list on the LinkedIn developer site.
That was easy to miss because the page URL from the page in the modal is not the URL that was currently showing in the browser's address bar. Once I added the URL for the page being shown in the pop up it worked.
After spending hours i finally get to the solution. You got an error no issues just check the url and find redirect_uri. Copy and Paste it's value it in your linkedin dev account oauth2 redirect field.
Make sure to add both with and without trailing '/' as redirect url.
http://localhost:8000/oauth/complete/linkedin-oauth2
http://localhost:8000/oauth/complete/linkedin-oauth2/

what is a valid value for REDIRECT URIS in Google Developer Console?

By the search results, I have concluded that it is so simple thing that no one has ever encountered such error. But here I am trying for the last hour. The problem is whatever I put in the "REDIRECT URIS" box in the Google Developer Console, It says "Invalid redirect URI.".. I have tried full URL, URL with and without www, just the domain name, name with relative path and every other possible thing. But response never changes. Any help will be highly appreciated.
If you give URI like this 155.155.10.100:2000 while creating Google API, then you can do one thing... go to http://aruljohn.com/ip2hostname.html site enter the above IP address and u will get the hostname for it and then you could enter that in your redact URI space when creating an API.

IIS Rewrite URL To Subfolder

Hi I am trying to match my Request URL and redirect to subfolder from Defauls Website.
My Default Website is crm.domainname.com. If someone try with this request ,it should redirect to crm.domainname.com/subfolder.
I tried this:
But it never redirect my request.
UPDATE
I make change and match with regular expression now.
It Works for 4-5 requests than again it stop redirecting.
The 'Pattern' field is meant to filled with a regular expression. Check this link for configuration options.

Hyperlink url contains localhost and port number

I am creating a searching website using ASP.NET .On my one page I show URL of results.When I click on URL a new link is open but the URL path for the new link in the browser include loalhost:portnumbet.I do not want this in my URL.
For eg.
result
so on clicking result I go to browser where the URL is "https://localhost:8080//www.google.com"
why this localhost:8080 includes in the URL.
Thanks
When you are redirecting to the URL, you will not be adding any protocol information, so it will default to the current website/protocol.
For example;
Response.Redirect("www.google.com")
is not the same as;
Response.Redirect("http://www.google.com")
You need to add the fully qualified URL, otherwise it will believe it to berelative to the current website, therefore add the http(s):// to the redirect.

Resources