What does a period mean in a url? - url

I use a website that has a URL like....
https://wwws.something.com/overview.event
I have never seen a period used in a URL like this before.
I cannot find anything on google or stack overflow of anyone describing this
What does it mean? How is it used?
To clarify it is the "overview.event" that I am confused about

Times where url was a path to file on server are gone. Now HTTP servers use rewriting (like mod_rewrite in Apache) to map url's to files with proper parameters.
Old PHP sites had url's like www.myblog.com/page.php?page=1 where page.php was actual file and ?page=1 was GET argument that was used by PHP interpreter.
Some people decided that pages looks nicer and are more readable if we do something like www.myblog.com/page/1 but there is no problem to do www.myblog.com/page.1 as well.

The URL just means that we want to mean it !
See informations on wikipedia : http://en.wikipedia.org/wiki/Uniform_resource_locator
You can have URL like http://www.example.com/image.jpg and have an gif image or a simple page or a video...

Related

Another way of doing GET

I have seen on varias different websites that when a forum post or something like that is doing they all have different URLs that make it look like they are in different directories, but I am sure they cannot make different directories for each post.
If you look at this website: https://oc.tc/forums/topics/5181a374ba6087261f000c59
The number at the end (5181a374ba6087261f000c59) changes for each post and it looks liek this is a different directory but I am sure it is not!
Could you please explain how they do this?
Thanks in advance!
Rob
Use apache .htaccess file to handle redirect to your php script
What they're doing there is providing the 518.... as a query string parameter. Their site interprets the request as http://oc.tc/forums/topics/{post}. It would be the same as doing something like http://oc.tc/forums/topics?post=5181a374ba6087261f000c59 (this is an example to show the idea).
Those sites use a technique called URL rewiring at Apache.
What they do is that they convert URL requests like this:
http://site.com/products/categoryA/myawesomeproduct
To something internal like:
http://site.com/?query=products/categoryA/myawesomeproduct
Then the process the rest in PHP. You can learn how to it with examples on the following link: http://roshanbh.com.np/2008/03/url-rewriting-examples-htaccess.html
Edit:
A full guide to redirects here: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

Advanced URLs and URL rewriting

I was visiting the site asos.com the other day. If you search 'tshirt' on their site the resulting URL is 'http://www.asos.com/search/tshirt?q=tshirt'. Does anyone know which technique they use to make it seem that the live generate a page called 'tshirt' which basically takes any extension?
Also if you select a product the URL becomes something like: 'http://www.asos.com/ralph_lauren/polo/product.aspx' I know they don't have a file and folder for every brand and item, so how is it possible for the browser to follow this url?
I'm not looking for any code, just a hint on what to google for more information.
Hope this doesn't sound too ignorant!
Many Ragards,
Andreas
In most cases, this sort of functionality (often called clean URL's, user-friendly URL's, or spider-friendly URL's), is achieved through server-side rewrites. To point all requests of a specific known structure to a single backend script for processing.
Now these specific URL's you mention are not, in my opinion, the best examples of clean URL's. I will give you an example however of how such a clean URL might be achieved using Apache mod_rewrite (since Apache is so popular).
Take for example a URL like http://somedomain.com/product/ralph_lauren/polo
You might be able to do something like this in mod_rewrite
RewriteEngine On
RewriteRule /?product/(.*)/(.*) /product.php?cat=$1&subcat=$2 [L]
This would silently (to the end user) redirect the incoming request for any URL's of the structure /product/*/* to a script called /product.php, passing the second and third parts of the URL as cat and subcat parameters to be evaluated by the script.
I'm not sure I understand what you are asking, but in the example you cited it's using a query string which is everything after the '?' in the URL.
On the backend server it uses the variables passed in the query string to determine what to return back to you.

Hide website filenames in URL

I would like to hide the webpage name in the url and only display either the domain name or parts of it.
For example:
I have a website called "MyWebSite". The url is: localhost:8080/mywebsite/welcome.xhtml. I would like to display only the "localhost:8080/mywebsite/".
However if the page is at, for example, localhost:8080/mywebsite/restricted/restricted.xhtml then I would like to display localhost:8080/mywebsite/restricted/.
I believe this can be done in the web.xml file.
I believe that you want URL rewriting. Check out this link: http://en.wikipedia.org/wiki/Rewrite_engine - there are many approaches to URL rewriting, you need to decide what is appropriate for you. Some of the approaches do make use of the web.config file.
You can do this in several ways. The one I see most is to have a "front door" called a rewrite engine that parses the URL dynamically to internally redirect the request, without exposing details about how that might happen as you would see if you used simple query strings, etc. This allows the URL you specify to be digested into a request for a master page with specific content, instead of just looking up a physical page at that location to serve.
The StackExchange sites do this so that you can link to a question in a semi-permanent fashion (and thus can use search engines with crawlers that log these URLs) without them having to have a real page in the file system for every question that's ever been asked (we're up to 9,387,788 questions as of this one).

How to improve the structure of URLs

From the article at google's webmaster center and SEO's pdf, I think I should improve my website's URLs structure.
Now the news url looks like "news.php?id=127591". I need to rewrite it to something like "/news/127591/this-is-article-subject"
The problem is if I change the structure of url to the new one. Can I still keep the old one working? If both url working, how to avoid search engine like google and bing to search twice times for one article?
Thanks!
HTTP 301 permanent redirect from the old URL to the new URL
an HTTP 301 redirect has the property of communicate a new (permanent) URL for an old (outdated) ressource to google (and other clients). google will transfer most/all of the allocated value from the old URL to the new URL.
Also, in order to improve the arquitecture of your website, you must keep a clean structure by inserting links within all its pages/posts. But be careful, you must not do this lightly, or Google´s robot will get confused and leave.
Structure is key to your SEO
1. Find one page which is the "really important page" for any given keyword
2. direct relevant content from other pages which is relevant to that particular kw
3. repeat with every relevan kw
I´m gonna leave this post for you, where I explain this more in depth, hoping that you understand spanish. http://coach2coach.es/la-estructura-web-es-la-base-del-posicionamiento/
Yep.. you can use robots.txt to exclude news.php, and create an xml sitemap with the new URLs. mod_rewrite can be set to only change directories, with trailing slashes.. so all files in your root directory should work fine.

How can I display short URLs without file extention?

I've looked around but wasn't able to find what I was looking for. I'm looking for a way to automatically create short URLs displayed in the browser, not using a URL shortener. Basically I would like to re-create something like this:
idzr.org/1ptb
I upload screenshots to my server with "GrabUp" on a regular basis but it creates rather long URLs for example:
/2523e3c90d60f08e952215424e7c5d99.png
It's a bit annoying having to shorten them each time.
I have seen this method a lot lately with pretty much any file including html files. If this has been discussed already I'm sorry I'm posting it again. I just seem to be stuck.
Thanks in advance for any help & advice!
I don't know, what webserver do you use.
You write rule for rewrite
-- htaccess for Apache or equivalent for IIS
You push content to user thru your code, because browser doesn't know what content get from web server
-- use http header - MIME type

Resources