I'm building a site with Jekyll. It seems like there's no inbuilt way to define a list of redirects (I want a list of links to redirect to the same place, but with /wiki as the prefix).
There is a plugin called jekyll-redirect-from, but when installing that and adding a redirects.json with my required redirects, it still didn't work. I still get a 404 when visiting those sites, rather than getting redirected. And no, rebuilding the site doesn't help.
Is there a way of specifiying (in the latest version of Jekyll, preferably in _config.yml) that /x, /y and /z should redirect to /wiki/x, /wiki/y and /wiki/z? I've seen a bunch of Github threads purporting to deal with this, but they (nor the jekyll-redirect-from plugin) seem to solve my issue
Related
Very new to Coldfusion, but not to web development so hopefully this is an easy question.
We recently changed a link on our website that took us to /folder/index.cfm. I want to make sure that when someone types www.ourwebsite.com/folder that it doesn't take them to /folder/index.cfm and instead to redirect them to another website.
Any pointers?
There are at least three ways it to do this.
Don't even bother with ColdFusion. Have your web server do the redirect. You are going to need to know if it Apache or IIS or whatever. You can then search for how that web server does it.
This might help you with some of that: Custom 404 error page not working on IIS 8.5
You can make a file at /folder/index.cfm and have a file that has
OR with cfscript
<cfscript>
location("newpage.cfm", false, 301)
</cfscript>
Note the addtoken and statuscode are optional. Add token helps because almost no CF website uses this kind of token. The status code helps because tells the browser that this is a permanent move.
You could intercept the request in application.cfc . In fact, in some systems all requested are checked for validity in application.cfc. You might still need a blank page at the target, but at least some ColdFusion is processed
Of all the options, 1 is my favorite, because there really isn't a lot that can be done with requests to missing pages. And the list of potential missing pages is unlimited.
I have setup GitHub pages and my site is working fine, but when navigating to the zip file at the site (i.e. mysite.com/example.zip), I get 404 error page. The files are in the repository and it seems that for some files it works as I can access PDF file just fine (i.e. mysite.com/myfile.pdf). Couldn't find any mention that GitHub Pages are blocking this, but seems like it, or am I missing something? Is there a list of files which ones are served and which not?
My jekyll blog is running ok in my pc but when I open it from my gh repository it's broken. Here's a screen of that
If I click on one of the links, that next page throws 404. Needless to say, I followed the steps from the gh site in order to configure it properly.
baseurl is set, the paths to css and images are correctly set using {{ site.baseurl }}. So locally the blog works fine, but still, on gh-pages it's not.
Code is here
Another piece of information. I have a master branch and a gh-pages branch, the one updated is gh-pages, master has old code, is it ok?
Any ideas please?
It works ! What you saw was an old version of your site.
Two possible explanations :
as #goyllo says : browser cache f5 or Ctrl+r can help.
Github pages is serving the old version and the new site generation is still pending.
In order to know if you last commit has been published it to go to https://github.com/goblind/modestoRimba/settings and to watch under GitHub Pages box.
If you see Your site is ready to be published at http://goblind.github.io/modestoRimba, your site generation is pending.
If you see Your site is published at http://goblind.github.io/modestoRimba, your site have been published with last commit.
It's working fine in my browser. I want to say one thing, GitHub pages cache your old resources(including HTML, CSS, JS, Images), in browser for better UX, For example, just disconnect your internet, and reload that page again, and it will be work fine, similarly if you visit another page, then it will not load your CSS, or javascript again from your website, they will load directly from browser cache. So you are getting this error because your browser use old cache resource, and it will update again in few hour, depending on cache time.
I want to say, if your blog working fine in localhost, then don't worry, it will be also work fine in github pages as well, otherwise github will send you notice in your email regarding page build fail.
in your _config.yml baseurl: /modestorimba R should be uppercase.
Got a notification from google webmaster tools that the number of 404 errors have gone up considerably, on inspecting the crawl errors I see a lot of errors to something that shouldn't there:
webmaster tools
I checked the source code but didnt find a mention of said URL so dont know where google is getting is from. This plugin directory doesn't even exist. Its a WordPress installation so theres a wp-content/plugins folder but no plugins/ folder.
What could be going on.. why is google trynna index a non existent URL and getting a 404.
Site URL is http://ladiesnightandbrunchesdubai.com
Any help would be appreciated.
This URL comes from Facebook Comments plugin. As it is not absolute URL, Google crawler thinks it is pointing to your website.
This probably didn't happen before either because:
1) Google crawler recently started execute more and more javascript - http://googlewebmastercentral.blogspot.be/2015/10/deprecating-our-ajax-crawling-scheme.html If this is the case, we could encounter more problems like this with 3rd party scripts on our website.
2) maybe Facebook comments plugin didn't have relative URLs
Solution:
Tell Google not to crawl these URLs by adding them to robots.txt
Disallow: /plugins/feedback.php
I'm seeing the same thing on my wordpress site. First occurrence was 11/23. There are now around 500 urls and growing.
I've grepped the wordpress codebase and can't find where that path is being constructed and discovered by google.
To fix the 404 report in Webmaster Tools I've added a 301 redirect on '^/plugins/feedback.php' to the homepage. And then marked all as 'Fixed' in Webmaster Tools.
I have a javascript and html snake game and I want to host it on github I do All the steps and make a gh-pages But I get this error 404 File not found ?when I search Username.github.io/repository-name
Any idea why and how I can fix it? Should I wait for github email After I do the commands??
Most web servers have a "default" page, e.g. index.html, that will be shown when the user doesn't request a particular page. GitHub Pages is no different.
Your repository contains a single file called snakeGame.html, which works just fine if you request it. Unfortunately, GitHub Pages doesn't know that this page should be shown by default. As far as it knows that file has no special meaning.
To get your page to show up at http://peggykh.github.io/Snake/ instead of http://peggykh.github.io/Snake/snakeGame.html, you should rename your file to index.html.