Facebook sharer.php does not allow my url - wordpress

https://www.facebook.com/sharer/sharer.php?u=
The above link does not allow this url.. "http://tamilagamtimes.com/"
https://www.facebook.com/sharer/sharer.php?u=https://www.google.co.in/ - its working perfectly.
But https://www.facebook.com/sharer/sharer.php?u=http://tamilagamtimes.com/ - it shows 500 internal server error

That´s because you got some serious HTML errors on your page, like missing apostrophes in href attributes, for example.
After fixing those errors, let Facebook scrape your URL again with the Debugger: https://developers.facebook.com/tools/debug/og/object/

Related

Why WordPress does not give 404 error, when adding some characters to the link?

Why doesn't WordPress throw a 404 error when changing a link, like this:
https://example.com/info/
to this:
https://example.com/info--/
or:
https://example.com/-info-/
Word Press does gives 404 error as firstly it is a markup language , not a programming language which will have a lots of bugs and secondly the error is not compiled in the language processer used in html

How to let crawler4j fetch page by relative path?

With Crawler4j, I can fetch page linked by a complete url, such as:
<a href='http://www.domain.com/thelink'>
However I found that if the link is relative, such as:
<a href='/thelink'>
Crawler4j will bypass this link(page), and I even have no chance to see the link in shouldVisit(Page referringPage, WebURL url) method.
I do not see any configuration about this in Crawler4j Github page, do I miss something?
As described in the related issue on the project page, it seems that this behaviour is related to the fact, that this specific web-page does a lot of rendering content using ajax / javascript.
However, crawler4j is not able to render javascript styling on demand as it does not include a javascript engine for this purpose. In addition, the script tag is not scanned for URLS yet.

Change HTTP status code for page in Adobe CQ5 (AEM)

I'm trying to support a CQ5 (5.5) installation developed by an outside firm for my company.
It appears that my company wanted a pretty 404 page that looked like the rest of the site, and using the custom Sling 404.jsp error handler to redirect to a regular page that merely says "Page Not Found" was the easiest way to do it. The problem is that the 404 page actually returns a 200 status code since it really is just a regular content page that bears a "Not Found" message on it.
This is causing us problems with Google and the GoogleBot, since Google believes all the old search links to now non-existent pages are still valid (200 status code).
Is there any way to configure CQ to return the appropriate 404 status code for the "not found" HTML page that we display? When I am in the CQ Author mode editing the page, I find nothing in page properties or in components that could be added to the page.
Any help would be appreciated, as CQ is not exactly my area of expertise.
You'll have to overlay /libs/sling/servlet/errorhandler/404.jsp file in order to do so - copy it to /apps/sling/servlet/errorhandler/404.jsp and change according to your specification.
And if you are looking specifically into setting appropriate response status code - you can do it by setting respective response property:
response.setStatus(404);
UPDATE: instead of redirecting to the page_not_found.html you might want to include it to the 404.jsp after setting response status:
<sling:include path="path/page_not_found.html" />
You can set the response code fairly easily with this sort of code: response.setStatus(SlingHttpServletResponse.SC_NOT_FOUND);
So for example, a quick-and-dirty implementation on your page_not_found.jsp would be as follows:
<%
response.setStatus(SlingHttpServletResponse.SC_NOT_FOUND);
%>
(or a longer-term/better implementation would be to set it via a tag and a tag library to avoid scriptlets)
If your page_not_found.html page is a static HTML page and not rendered via a jsp, you may need to change your 404.jsp so it redirects to a page that is rendered via a jsp for this approach to work. The status code is set by the server rendering the response. It is not something intrinsic in the HTML itself, so you won't be able to set this in a regular, static HTML page. Something must be done on the server to set this status code. Also see How to Return Specific HTTP Status Code in a Plain HTML Page

Rules not working as expected - tags don't fire

I'm setting up tracking on Google Tag Manager today and am having some trouble with rules.
I have a custom HTML tag where I'd like to fire only on a given page:
https://example.com/index.php/page/index/10
Call the rule "Page 10". In rules I have tried:
url equals: https://example.com/index.php/page/index/10
url contains: page/index/10
url ends: page/index/10
url contains: page/index/10
When this rule is applied to the tag in question it does not fire. I know the tag works because when I apply another rule to it, all pages (url regex .*) it works fine. But, this tag must only work on page 10.
Is anything apparent from the info given? I'm not sure what else could be relevant?
Nothing immediately jumps out. Are you sure you're viewing the secure version of the URL when testing?

Cannot pass url in html code

I cannot pass URL in html code. I want to do like this :
eg.
http://www.myname.com/page.aspx?id=1&name=test&msg=message message message
If I do like that then The page cannot be found.
I also try like this:
http://www.myname.com/page.aspx?id=1&name=test&msg=%3Cp%3Emessage%20message%20message%3C/p%3E
but still cannot. I try in my localhost. It is Okay but if I upload in my server this method will not work.
So how I can pass URL in html code?
"The page cannot be found"
Have you tried navigating to the page without the extra stuff?
It doesnt look URL friendly to me but perhaps this guide will make it reader ok and properly URL encoded http://www.w3schools.com/asp/met_urlencode.asp
Im thinking ur looking for
response.write(Server.URLEncode("http://www.myname.com/page.aspx?id=1&name=test&msg=message message message"))
Just Be aware that spaces are generally bad in URLS as with some Special Characters as well You don't want to trust user input to output as URL i reckon

Resources