We have a unique situation, and I can't find an answer for it. For that matter, I can't even think how to phrase the query effectively.
Our former server used IIS6. The folder structure worked like this:
ddrive
inetpub
webcontent
site 1's content
site 2's content
...
site n's content
The index.asp file that drives the websites is in the "webcontent" folder, thus all sites share a common root. This let us have one engine driving all. It worked because IIS6 stores configuration settings in the metabase (right?).
It appears (and I'm just feeling my way along, here) that configuration settings are stored in the root folder in an text file. This means that if I try to add a second website using the previous model, I get conflicts.
Two questions, then:
Are my assumptions about my situation correct?
Is there a way to use a similar setup to what I had before, or do I have to rewrite the engine? For the sites, there is no .NET. Everything is in classic ASP, migrating ever so slowly to PHP.
I have a website that is rewritten so URLs are .html
eg: mysite.com/about-us.html
I'm going to add a search feature in which could have a number of different criteria. So my question.... I know the following would work ok as I tried it:
mysite.com/search.html?var1=xxx&var3=xxx
Is there any reason why I should do this as html pages generally wouldn't have variables? I will test, but would there be any browser issues (old browser perhaps)? Any SEO disadvantages?
Thanks :)
Of course ".html"-files can contain variables.
It is not dependent of the Browser but the Server Configuration.
The Server respectively the php-parser must adjusted to parse .html files.
But I don't think that ".html" ending are relevant for google see:
https://webmasters.stackexchange.com/questions/5333/url-rewrite-should-i-write-a-fake-file-suffix-html-or-something-more-realis)
I am developing a MVC 3 Web Application and just tried to deploy it on IIS 7.5
The page is shown, but all the images as well as url path is not working at all.
I search through a lot of sources and found out that it seems to be compulsory for a MVC application to have all path being enclosed in either:
#Url.Action
#Url.Content
#Html.Action
and so on. So I tend to change all my relative path by using those valid method.
I understand it should be a correct way to use all those valid mvc helpers, but I am just a beginner and this is my first web application. My question is:
Is it possible to use any method to "resolve" the relative path so that it can be found even after deployed?
Really need help here... thank you very much....
You are not correct that you need to use those helpers for all URLs. There is nothing to prevent you from outputting URLs 'manually', as literals, or as you have done above.
Something wonky has happened with the paths of the files on your server upon deployment, most likely.
I have created a directory based site in ASP.NET MVC3 which when you navigate through the site you get to a page like http://server/domains/details/mydomain.coop.
The rest of the site works fine however when you go to this url you get a page not found error. I have put logging in to the controllers and the action in the controller is not fired. It works fine on my local machine (VS2010 / W7) but when it it is put on to the live servers (MS 2003 server IIS6) it breaks.
If the url does not contain the "." in the final domain name part (the bit that is passed through to the optional parm "id" on the default route then it all works.
Does anybody have any ideas what I can do as I really want the "." in the id part for SEO
Many thanks
Jonathan
You could use a - to make your url like http://server/domains/details/mydomain-coop. I'm not sure of the SEO implications, but I can't imagine it being better or worse than a .
Periods and other punctuation have a very specific meaning in URLs - in this case, it indicates a file extension, which is used to determine which IIS modules and filters (I always get these two confused) are activated to handle a request.
You should really think twice about formatting your URLs this way; non-standard uses like this are not your friend.
Conjecture:
It's possible that a search engine may use the part after the . to determine MIME type, and either ding your score if it doesn't match the actual page content, or it could ignore the link entirely. Note that, for instance, Google indexes images and pages differently based on both file extension and MIME type (though someone more versed in the dark magic of Google's internals may chime in with a better/more accurate explanation.)
Here's a nice post on getting ASP.NET to ignore certain file extensions,
See also this SO question about a similar issue (registering custom file extensions - in this case, .coop)
The important web.config entries from the second link are:
<httpHandlers>
...
<add verb="*" path="*.mycustomextension"> type="System.Web.UI.PageHandlerFactory"/>
<compilation >
<buildProviders>
<add extension=".mycustomextension" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
I haven't had time to test this, but hopefully it'll get you going in the right direction.
When I look at Amazon.com and I see their URL for pages, it does not have .htm, .html or .php at the end of the URL.
It is like:
http://www.amazon.com/books-used-books-textbooks/b/ref=topnav_storetab_b?ie=UTF8&node=283155
Why and how? What kind of extension is that?
Your browser doesn't care about the extension of the file, only the content type that the server reports. (Well, unless you use IE because at Microsoft they think they know more about what you're serving up than you do). If your server reports that the content being served up is Content-Type: text/html, then your browser is supposed to treat it like it's HTML no matter what the file name is.
Typically, it's implemented using a URL rewriting scheme of some description. The basic notion is that the web should be moving to addressing resources with proper URIs, not classic old URLs which leak implementation detail, and which are vulnerable to future changes as a result.
A thorough discussion of the topic can be found in Tim Berners-Lee's article Cool URIs Don't Change, which argues in favour of reducing the irrelevant cruft in URIs as a means of helping to avoid the problems that occur when implementations do change, and when resources do move to a different URL. The article itself contains good general advice on planning out a URI scheme, and is well worth a read.
More specifically than most of these answers:
Web content doesn't use the file extension to determine what kind of file is being served (unless you're Internet Explorer). Instead, they use the Content-type HTTP header, which is sent down the wire before the content of the image, HTML page, download, or whatever. For example:
Content-type: text/html
denotes that the page you are viewing should be interpreted as HTML, and
Content-type: image/png
denotes that the page is a PNG image.
Web servers often use the file extension if the file is served directly from disk to determine what Content-type to assign, but web applications can also generate pages with any Content-type they like in response to a request. No matter the filename's structure or extension, so long as the actual content of the page matches with the declared Content-type, the data renders as intended.
For websites that use Apache, they are probably using mod_rewrite that enables them to rewrite URLS (and make them more user and SEO friendly)
You can read more here http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
and here http://www.sitepoint.com/article/apache-mod_rewrite-examples/
EDIT: There are rewriting modules for IIS as well.
Traditionally the file extension represents the file that is being served.
For example
http://someserver/somepath/image.jpg
Later that same approach was used to allow a script process the parameter
http://somerverser/somepath/script.php?param=1234&other=7890
In this case the file was a php script that process the "request" and presented a dinamically created file.
Nowadays, the applications are much more complex than that ( namely amazon that you metioned )
Then there is no a single script that handles the request ( but a much more complex app wit several files/methods/functions/object etc ) , and the url is more like the entry point for a web application ( it may have an script behind but that another thing ) so now web apps like amazon, and yes stackoverflow don't show an file in the URL but anything comming is processed by the app in the server side.
websites urls without file extension?
Here I questions represents the webapp and 322747 the parameter
I hope this little explanation helps you to understand better all the other answers.
Well how about a having an index.html file in the directory and then you type the path into the browser? I see that my Firefox and IE7 both put the trailing slash in automatically, I don't have to type it. This is more suited to people like me that do not think every single url on earth should invoke php, perl, cgi and 10,000 other applications just in order to sent a few kilobytes of data.
A lot of people are using an more "RESTful" type architecture... or at least, REST-looking URLs.
This site (StackOverflow) dosn't show a file extension... it's using ASP.NET MVC.
Depending on the settings of your server you can use (or not) any extension you want. You could even set extensions to be ".JamesRocks" but it won't be very helpful :)
Anyways just in case you're new to web programming all that gibberish on the end there are arguments to a GET operation, and not the page's extension.
A number of posts have mentioned this, and I'll weigh in. It absolutely is a URL rewriting system, and a number of platforms have ways to implement this.
I've worked for a few larger ecommerce sites, and it is now a very important part of the web presence, and offers a number of advantages.
I would recommend taking the technology you want to work with, and researching samples of the URL rewriting mechanism for that platform. For .NET, for example, there google 'asp.net url rewriting' or use an add-on framework like MVC, which does this functionality out of the box.
In Django (a web application framework for python), you design the URLs yourself, independent of any file name, or even any path on the server for that matter.
You just say something like "I want /news/<number>/ urls to be handled by this function"