I understand that .htaccess is not supported by GitHub Pages. Is there an alternative for password-protecting particular directories for websites hosted by GitHub Pages?
Although you can't use .htaccess or .conf, Github has instructions on how to use the Jekyll Redirect From plugin.
https://help.github.com/articles/redirects-on-github-pages/
The page above no longer has any mention of the plugin. The direct link to the jekyll-redirect-from plugin GitHub repo is https://github.com/jekyll/jekyll-redirect-from
"Unfortunately, GitHub pages only supports static pages. There is no way to make it execute server-side code and thus it's impossible to protect your pages with any kind of authentication scheme. If you expand further on why you need to password-protect your pages, maybe I can help you find a workaround."
Source: https://webapps.stackexchange.com/questions/35692/is-there-an-alternative-to-using-htaccess-to-password-protect-subdirectories-in
I'm using a 404.html to redirect users from old S9Y index.php to my new blog on Github Pages. Check this commit: https://github.com/lionello/lionello.github.io/commit/c175f6524a53e29aea1890c8a758afd0e8944852
This post comes out at the top of web search when you look for .htaccess redirects in github pages. I am going to answer this question in that sense.
One option is to use a DNS redirect instead. You do this by putting a file named CNAME in the project's root directory (not sure if it works in a subdirectory). Just put the redirection URL in the file. However, there are a few limitations, e.g. you can only redirect to a website's root.
The answer is yes you can now add "404.html" in you code Repository. You can display a custom 404 error page when people try to access nonexistent pages on your github site.
For more information you can refer to this link!
Related
Currently a TYPO3 website of ours has had a complete revamp and we would like to redirect all the old URL's in Googles index to the new existing URL's
For regular pages I used the new site management tool (Redirects) in TYPO3 v9. However what is left is the old indexed links of the content.
www.websitename.com/content/docs/this-is-my-document.pdf and so on. Including images and other miscellaneous links to files.
Now what would be the best way to redirect those links?
I could use htaccess ofcourse or is there something in the TYPO3 core/Extbase what I could be able to use?
I would always prefer redirects with mod_rewrite in the .htaccess file since it's much faster than any TYPO3 solution. If the redirect is done via .htaccess, there is no need for the webserver to invoke PHP or the database. Thus it's faster.
Found out we stopped rewrites by default for URL's with:
RewriteRule ^(typo3/|content/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
By removing the 'content/' I was able to use the redirect functionality from the core. This was done so we could manage redirects through the TYPO3 enviroment in the future.
as Peter said above it would be faster to use .htaccess but we would like for it to be more manageable in the future through the system. So we chose the core option.
I am trying to resolve the "leverage browser caching" warning for my jekyll blog. I have consulted the HTML5 boilerplate github and cloned the project. I then copied over the .htaccess file into the root directory of my own blog, however, when I retest my website, I still have the same browser caching score. I have confirmed that there is language related to expiration dates within the .htaccess file. My github project can be found here:
https://github.com/thedatasleuth/thedatasleuth.github.io
.htaccess is for an Apache web server. Github pages is not an Apache web server and whatever server technology it is, they don't allow you to adjust those settings.
I have installed the mediawiki on my site like this: mysite.com/index.php/Main_page
I have used the Short URL method to change the url to mysite.com/Main_Page
What exactly I have to put on my robots.txt file?
I don't know how to follow this guide:
https://www.mediawiki.org/wiki/Manual:Robots.txt#With_short_URLs`
because the main install was on the root.
The linked tutorial is still valid, as long as you did not reconfigure your script URL (the one you see when editing pages).
Whether your robots.txt will work is another question; it will now reside in the same URL space as your wiki pages...
I made an update of my non-responsive to responsive template and there is no need of my old fashion static mobile website and redirection to it (www.mysite.com/mobile/index.html). I want to completely remove directory with mobile site so that my old mobile site is not available anymore.
I'm concern with numerous 404 errors afterwords and their effect on my current Google search appearance. Maybe somebody could help me with advice what would be the best practice in this case.
I'm using CSM Joomla, Apache server and I have configured .htaccess file.
I would like the most to 301 redirect whole mobile directory to my home website link (www.mysite.com) but I'm aware that would be really bad from the Google's point of view. Any help would be greatly appreciated.
Redirecting the whole site to the home page would be seen as a soft 404 by Google. Either redirect each page to the new equivalent, or return a 404/410 response.
Right I'll try and explain my situation as thoroughly as possible while also keeping it brief...
I'm just starting out as a web designer/developer, so I bought the unlimited hosting package with 123-reg. I set up a couple of websites, my main domain being designedbyross.co.uk. I have learnt how to map other domains to a folder within this directory. At the minute, one of my domains, scene63.com is mapped to designedbyross.co.uk/blog63 which is working fine for the home page. However when clicking on another link on scene63.com for example page 2, the URL changes to designedbyross.co.uk/blog63/page2...
I have been advised from someone at 123-reg that I need to write a .htaccess file and use the RewriteBase directive (whatever that is?!) I have looked on a few websites to try and help me understand this, including http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html however it all isn't making much sense at the moment.
Finally, scene63.com is a wordpress site, whether that makes any difference to how the htaccess file is structured I'm not sure...
Any help will be REALLY appreciated - Thanks.
I run my personal public website on Webfusion, which is another branded service offering by the same company on the same infrastructure, and my blog contains a bunch of articles (tagged Webfusion) on how to do this. You really need to do some reading and research -- the Apache docs, articles and HowTos like mine -- to help you get started and then come back with specific Qs, plus the supporting info that we need to answer them.
It sounds like you are using a 123 redirector service, or equivalent for scene63.com which hides the redirection in an iframe. The issue here is that if the links on your site use site-relative links then because the URI has been redirected to http://designedbyross.co.uk/blog6/... then any new pages will be homed in designedbyross.co.uk. (I had the same problem with my wife's business site which mapped the same way to one of my subdirectories).
What you need to do is to configure the blog so that its site base is http://scene63.com/ and to force explicit site-based links so that any hrefs in the pages are of the form http://scene63.com/page2, etc. How you do this depends on the blog engine, but most support this as an option.
It turned out to be a 123-reg problem at the time not correctly applying changes to the DNS.