This is my first time using Gitlab.
My repository url is myusername.gitlab.io/myrepo.
Opening that page gives me a 404 error, however when I open myusername.gitlab.io/myrepo/myindex.html, I get my index page.
Can someone tell me how I can set it so myusername.gitlab.io/myrepo loads myusername.gitlab.io/myrepo/myindex.html.
On a second note, I have seen other projects that use username.gitlab.iowithout the need for the/therepo` suffix.
Can anyone tell me how I can remove the suffix and just use the domain to access my repo.
Your server may prefer a default 'index' file to be loaded. In some cases, it may not handle the default file at all.
Rename you index file from myindex.html to index.html
First, to start, you can fork a pre-set project, with the right files in it (including an index.html): see gitlab.com/pages for examples, and "Getting started" for the steps
.
I really want to have myusername.github.io only
Second, that is a user website: make sure your repo (where you have forked/cloned the project example) is named after your GitLab login: <you>.gitlab.io.
Related
I'm currently developing a simple static web page with only HTML.
I'm using tags with href to link to different pages and the VS code live server used to work when I inserted a link like page1.html it would send the browser to this page.
But I prefer to have just the page without the .html.
When I remove the .html from the link the live server gives an error: Cannot GET /page1
But when I deploy my site on Netlify it does, however, find the page, but this breaks the development process for me.
How can I fix the live server so it also gets sent to the correct page?
Thank you in advance,
Timo
This is a common server behaviour. The server tries to find a file or folder name page1 but doesn't find it. Nothing wrong with live server. I guess Netlify is the one doing extra magic.
However if you want to remove the .html in page1 you could create a folder name page1 and put inside a index.html with the content. This way the server will find the folder named page1 and return the index.html. This will also work with live server and any standard server.
This is how your folder structure could look like:
Cannot GET /source/gfdfghdgh/A/1&2.html
This is the error I get because of the '&' symbol.
Make sure your file name is browser friendly.
VS CODE LIVE SERVER CANNOT GET ERROR MESSAGE
Restart VSCode
Sometimes the best you can do is start VSCode from scratch. First, save all of your work. Then close VSCode, which will also stop all of the extensions you've installed. Then, reopen VSCode and try again – go to the HTML file you want to view, right-click## Heading ##, and select "Open with Live Server".
guys I'm supposed to upload assignment for this online course..
I followed the tutorial along exactly but something is not working properly.
https://zwc1625.github.io/coursera-web24/ is the where my repo is published and it's working fine.
but,
https://zwc1625.github.io/coursera-web24/mod_2/
where mod_2 is the assignment folder containing 1 html and 1 css file,
when I try to type in this address in the url 404 comes up
My local drive is up to date with the github repo
Help. New and very frustrated with github, I'm spending so much time with this and making no progress.
Github will serve a few specifically named files automatically, like 'index.html', 'readme.md' or 'readme'. Most servers will look in the specified folder (https://zwc1625.github.io/coursera-web24/mod_2/) for files named: 'index' or 'default' with a specific extension like 'html', 'asp', 'xhtml'.
As the file in your folder 'mod_2' is called 'module2HTML.html' it will not get served automatically. Consequently, if you want to open that file in your browser, you will need to name it specifically in the URL you enter in the browser addressbar: https://zwc1625.github.io/coursera-web24/mod_2/module2HTML.html
Furthermore, when you did name your file 'index.html' it may be possible that there is a time lag between your 'commit' and Github being able to serve your page. Some patience may be required....
EDIT: Waylan's answer did the trick! Thanks!
I'm trying to zip .html files of docs to send to a customer. The goal is to have the same experience as navigating an actual website.
When opening the .html files, any link that is clicked goes to the parent folder, rather than the specific .html. For example, if I click on the link for the configuration page, it takes me to this parent folder (shown in the picture) with an index.html to the actual page. This is only happening in my local instance when I'm going through the .html files -- not when I'm navigating the built .md (using MkDocs).
macOS Catalina, 10.15.3
MkDocs
Markdown
You probably want to set use_directory_urls: false in your mkdocs.yml config file.
The behavior you are seeing is based on a feature of web servers. If you request a directory (for example /foo/) then the server will return the index page within that directory (/foo/index.html). MkDocs makes use of this feature to provide "pretty URLs" (URLs which do not have file extensions).
Therefore, when building the site, MkDocs will convert every page to an index file within a directory and will also rewrite all of the internal links to point to those locations. So long as the pages are hosted on a server which is configured to serve index pages (most are by default), this is not an issue.
However, if you are browsing the files locally without a web server or happen to be using a server which is not configured to handle index files, then you will see the behavior you are getting. You have two options:
Use a properly configured server.
Turn off the feature with MkDoc' use_directory_urls configuration setting.
To do the latter, add the following to your mkdocs.yml config file:
use_directory_urls: false
Then rebuild the site with mkdocs build. Now your pages will not all be index files.
Note that while this allows you to browse the files without a server (using file:///), due to browser security policies, search will no longer work within a MkDocs site. Therefore, it is recommended that you always use a server. That also explains why the default configuration expects a server.
I am not having success when trying to publish my basic html page.
Here is my repository:
https://github.com/mathiasgc/mathiasgc.github.io
I have an index.html file in my master repository, as well as the CNAME with the domain name.
Thanks,
Mathias
The problem appears to be that you forgot to give your index file an extension. You have an index file successfully in your repository, but it is simply called index. You need to give it a valid index extension - in your case I believe you're looking for index.html.
When uploading your index file, make sure to actually call it index.html specifically, and not just index.
Hope this helps! :)
I migrated my magento website to a different server, following the steps described here. Everything went smoothly, except for the fact that when I load the page, the CSS won't load, and I just get the page in plain text.
I used firebug and noticed that the path the system is using to get to the CSS file doesn't exist in the FTP server. It starts with the 'minify' folder, which makes me think that something might be cached from the previous server.
An example:
my_site_url/minify/1281335374/skin/frontend/default/hellouno/css/styles.css
This path doesn't exist, not even in the previous server, so I'm thinking maybe these files are supposed to be generated on the fly? I'm really confused, any help will be very appreciated!
In my case, the problem was a missing Slash "/" at the end of the domain.
Use the following to get both rows:
SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';
Then update them manually and make sure the domain has it's final "/", otherwise it will merge the domain name with the following folder name.
You can check whether this is your condition if when doing inspect, you see a wrong path to CSS and JS.
Correct Config:
Incorrect Config Results in:
Remember to clear the var/cache folder.
I'm going to assume you cleared your cache out. If "not having CSS" makes this hard to do via the admin, just delete the
var/cache
folder.
Sometimes giving the CSS (or Javascript) merge settings a quick toggle from on, to off, to on again will force Magento to recalculate the paths.
System -> Developer -> CSS Settings
If you can't access this in the Admin, change the value manually in the database table core_config_data (identified by the path column having the value dev/css/merge_css_files), clear your cache and reload your page
Sounds like an issue with your .htaccess file. Minification rewrites are handled there. If you haven't already, make sure your .htaccess file came over in the transfer, and make the appropriate changes if directories or anything else has been changed.
Thanks its helped me i just forget to place / in the end of the path.
Before:
Base URL http://mywebsitename.com
After:
Base URL http://mywebsitename.com/
Its solved all skin/css and admin problem. Cheeers
I solved the issue, by changing the merge css options in the backend to no
It was a bit difficult to navigate through backend without css but managed to get there!
System > Configuration > Developer > CSS Settings
If you haven't changed your site information (url and such) in the backend (or in the database) after the migration, this is the likely problem.
http://www.siteground.com/tutorials/magento/magento_configuration.htm#base_url
for the database:
in the core_config_data table
change key "web/unsecure/base_url" to your site base url ex. http://yoursite.com
good luck!
Experienced same problem once.
The solution:
I'd forgotten to put trailing slashes at the end of my base_urls when I'd updated them
System > Configuration > General > Web > Unsecure
Base URL http://mybaseurl.com/
System > Configuration > General > Web > Unsecure
Base URL https://mybaseurl.com/
If you're Admin section is out of bounds you can also set this value in the database in the table core_config_data
Fields: web/unsecure/base_url and web/secure/base_url
Also: Remember to flush your cache after doing this.
Check permissions for the folders like app/etc, var, media folders. Try to give 755 permissions to those folders. Recently I have faced the same problem and I tried with this. Then my site works fine.
Change Permission Of Skin And Media Containing All Folder TO Give Permission 755 And File TO 644
Mine was also the forward slash ( / ) at the end of the url in the sql database. Cleared Cache and it worked perfect.
One answer that has not been given yet that turned out to be the solution to my problem:
When transferring the Magento store from 1 host to another, what usually isn't copied over is the VirtualHost entry. In my case I had to manually recreate this and wrongfully added AllowOverride None. This should be AllowOverride All in order for .htaccess files to be read and processed.