Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I've been trying to do some research for whether or not I should include file extensions in my url paths in my website (and whether or not it is detrimental to use relative urls).
Among some of the sites I have visited for this research are listed below:
http://css-tricks.com/snippets/htaccess/remove-file-extention-from-urls/
http://www.seo-theory.com/2011/11/30/how-do-pretty-urls-help-search-engine-optimization/
However, none of them have really answered my questions.
As for whether or not to include file extensions:
Assuming that all of the links are NOT broken, and I have constructed them properly, are there any downfalls to linking to other pages within my site and including the file extension? Originally, I thought I should include them just for specificity's sake, but now I know it doesn't make as pretty of a url.
Does this effect SEO greatly?
Should I go back and erase all .cshtml, .jpg, etc. from my url paths? Should I include this removal from the tags that link to my .js and .css external files?
If it matters, the context of this question is coming from a C#.net WebMatrix environment.
You can erase the .cshtml part of your urls if you like (I generally do) but you should not erase the extensions of images, style sheets, JavaScript files etc. The .cshtml files will be found by the Web Pages framework through its rudimentary routing system, but that only applies to .cshtml and .vbhtml files. If you remove the extensions from other types of file, they will not be found. And in any event, it would be pointless. It's not as if you want Google to index your .css file (which it doesn't).
As to whether removing the .cshtml extension will affect SEO - no, it will make no difference. If it did, you would easily be able to find a lot of advice to that effect.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I create new website by MVC5.The pages (.cshtml) in the my website are dynamically generated. I want to know that are pages with .cshtml index able by google crawler?
First, .cshtml is never served directly, so in one sense, no they will never be indexed by Google or any other search engine, because they cannot be seen by Google or any other search engine.
However, those .cshtml files are utilized by controller actions to return an HTML response. As a result, any route indexed by Google that leads to an action that utilizes one of your .cshtml files will allow Google to index the parsed contents of that file. This is not the same thing has Google directly indexing the physical file, though.
MVC does not serve .cshtml files. It processes them and converts them into plain HTML text output. This makes it possible to be completely compliant with web standards and cross-platform (or not, depending on whether you use the built-in HTML helpers or go out of bounds and out of compliance). This includes, but is not limited to, being able to be indexed by search engines such as Google.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm going to create some AngularJS/Rails app, but I'm a newby in developing with AngularJS. So, I have one question: should I divide my project with 2 parts: the first one is just HTML/CSS/JS code and the second one is Rails API? I also can do all work in the Rails project. What should I prefer? Thanks in advance!
Personally I feel that the clean way is to put the html files under the public folder. Also this will make it easier to point Angular routes to your html files as you don't have to mix .erb with your javascript, which also gives you the ability to use pure coffeescript everywhere (You cannot make .coffee.erb files sadly).
The folder structure for all my Angular applications was following:
Angular coffee files:
app/assets/javascripts/angular/
In there I have seperate folders for controllers services and directives. In controllers folder I have the same namespacing going on as in Rails controllers folder.
So if there is a content namespace where I have likes and media controllers inside of it, then it looks the same in Angular folder.
Angular template files:
public/templates/
In public/templates where I keep the .html files, I follow the rails way of naming folders and files, and also keep the namespacing. So if users folder has an index page and a show page then I also have show.html and index.html.
Here are some very good examples where people have made Angular - Rails applications:
CafeTownsend
Rails4-AngularJs example
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
how would you do to be able to change messages without having to stop the play instance?
You can't do that if your messages files are declared in common destination (and probably they are).
If you want to make it easier you need to put some additional work, for an example, you can use JavaScript for translating the labels, next you need to put these files OUTSIDE the public folder of the app, somewhere in the filesystem and access it with additional http server (otherwise it will require redeploying the app after each change).
off-topic:
In general I'm big advocate of serving static, public assets with frontend HTTP server instead of using the assets.at... method, thanks to this approach you are able to add/change/delete these assets without redeploying the application, and as we know images/scripts/styles are very often the subject to change. Finally you don't waste Play's resources for serving that stuff, and you are able to write advanced caching rulez with server's config (instead of 'fighting' with proper headers in Play's controllers)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am currently using BlogEngine.net as my blogging platform. I'm fascinated with the beauty and simplicity of Jekyll and want to move to it.
I have found 2 resources which help in migrating existing posts: http://doingthedishes.com/2011/04/14/moving-to-jekyll.html and http://philippkueng.ch/migrate-from-blogengine-dot-net-to-jekyll.html. I am yet to try these methods. However, I'm worried about conflicting URL structures, which can cause broken links to my posts which are referenced elsewhere.
BlogEngine.net uses the URL structure "http:// sitename.com/post/title-of-the-post.aspx". I'm not sure if I can retain the same URL structure after migrating to jekyll (I've checked Jekyll's permalinks https://github.com/mojombo/jekyll/wiki/Permalinks, but I don't think it can help). Kindly let me know how I can solve this problem of migrating from blogEngine.net to jekyll without breaking URLs and losing SEO ranking.
Edit: I want to host my static blog on Github pages, which do not support redirects. Is there a way I can use Github or should I choose a host which supports htaccess redirects?
You can maintain the same URL structure with Jekyll. Add the following in _config.yml file,
permalink: /post/:title.aspx/index.html
Jekyll picks the :title from the URL part of file present in _posts folder.
Ex: File name: 2012-06-09-title-of-the-post.markdown, title: title-of-the-post
Since my blog is powered by Jekyll, I tested locally with this new URL format with .aspx extension. It worked.
Jekyll creates a folder called "title-of-the-post.aspx" instead of file, and creates index.html inside that folder. so no redirects required.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
On a site I'm working on there will be about 7 different directories. I use DirectoryIndex in my .htaccess to point to index.php, so you can go to site.com/menu/ or site.com/menu/index.php and get the same content and so on for the other 6 directories.
I know duplicate content is supposed to be bad. Will this cause any SEO issues, or will search engines be smart enough to understand it's a DirectoryIndex and only index the result once?
Using DirectoryIndex is a very common practice. If done right it isn't a problem. However it can introduce duplicate content.
Pick one to be "canonical". You probably want to use site.com/menu/ as canononical. Who wants to see "index.php" in urls?
Never link to the non-canonical version. Instead of href="index.php" use href="./" Users shouln't ever see "index.php" in the url by clicking around the site.
If you do that, Googlebot will probably never even know what the real name of the file is and there will be no problem. If Googlebot does start crawling urls with "default.php" in them, then use the canonical tag to tell Google which is the correct url that it should pay attention to.