wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> general problem-solving / chatting / whatever >> url rewriting
(Message started by: photographers01 on May 14th, 2012, 5:13am)

Title: url rewriting
Post by photographers01 on May 14th, 2012, 5:13am
what is url rewriting and how we do this?What is the need of url rewriting?

Title: Re: url rewriting
Post by towr on May 14th, 2012, 8:54am
Url rewriting is a way to map the url to a file/script on your server.
For example http://my.domain.com/this/is/a/wonderful/site could be rewritten by apache so it goes to ~home/public_html/crappyscript.php
One of the uses is that you can simple obscure what sort of back-end you're using; if they don't know if you use php, asp, .net, perl, ruby on rails or python (to name a few), then they can't use specific attacks on your site. They'll have to try out everything to find a weakness.
It can also make for more readable urls. For example http://my.domain.com/search/kittens/page_1 is a bit nicer to read than http://my.domain.com/cgi-bin/search.cgi?query=kittens&page=1
Furthermore it makes it very simple to force all access to your site through one gateway/router script, so that people cannot execute scripts on your site by calling them directly. This gives you more control on checking whether they have the correct authorization to access to certain parts/tools/options.

Title: Re: url rewriting
Post by cartoonle on Dec 1st, 2012, 11:18am
URL rewriting is used to transfor complex URLs to simple, which are easier to read, easier to remember, search engine likes them better,...

Title: Re: url rewriting
Post by movie4fun on Aug 18th, 2014, 6:38pm
you can do it via htaacess in your server it helps with google ranking and its more user friendly.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board