I'm not sure if this is the right term, but I wish to cloak URLs. For example, I have a URL: http://torontoweddingplace.com/Toronto_Wedding/CategoryList.aspx?Cat=Photographers&CatID=19 (http:// torontoweddingplace.com/Toronto_Wedding/CategoryList.aspx?Cat=Photographers&CatID=19) and I want to convert it to appear as: http://torontoweddingplace.com/Photographers/ on the internet browser This is to reduce the URL length and to prevent the user from knowing my HTTP variables. I know this can be done as I've seen it in countless sites. I was just wondering how it can be achieved. Also, will this hinder my SERPs?
This is basically use when doing SEO. A simple .htaccess script can solve your issue. whic hwill be put in root folder and that will transalte your urls to the ones you wanted. I worked a little with such pattern, but I will give it a try and then post the code. regards
I was aware that something called mod rewrite is possible for Apache/PHP. However, is there an alternative for ASP.NET?
Another way is to : 1) create a folder name photographers, and make sure you could access that folder via web as http://torontoweddingplace.com/Photographers/. Then insert index.html in that folder. In your index.html use this code to redirect you to the correct location. 2. Create folder as mentioned above and insert a script file named index.cgi / .php etc. In this program it will read the whole content of http:// torontoweddingplace.com/Toronto_Wedding/CategoryList.aspx?Cat=Photographers&CatID=19 and present it. This way it will not be seen as redirecting, keeping your url the same and taking care the SEO. Hope that helps, cheers,
The proper term here is URL re-writing... I dont really have that much experience in ASP .NEt but i heard it is much easier to implement in .NET than in PHP.. azlanhussain's idea will/could work but it is not very efficient if you have multiple pages that you like to work this way. Try this link, hopefully it could help... http://www.sitepoint.com/article/guide-url-rewriting
Should be able to use something similar to: RewriteEngine on RewriteRule ^Photographers/$ http://torontoweddingplace.com/Toronto_Wedding/CategoryList.aspx?Cat=Photographers&CatID=19 [L,QSA] Code (markup):
you can do url rewriting by ".htaccess" file example : to use that type of url rewriting you need to write below coding into .htaccess file Options +FollowSymLinks RewriteEngine on RewriteRule CategoryList-Cat-(.*)-CatID-(.*)\.htm$ CategoryList.aspx?Cat=$1&CatID=$2 PHP: here is the tool i found it can make your problem easy http://www.webconfs.com/url-rewriting-tool.php
The best way I've found of doing this (not the only way), but the simplest for IIS servers (asp.net) is to use an IIS plugin from helicon tech, the basic version is free. Let's you rewrite urls in the same way as you can with apache and it's htaccess file. I Can't post live links yet so just google "Helicon Tech Isapi rewrite" and you'll find it.
okay, to try and clarify, I'll use my site as an example the term you are looking for is "Url rewriting". On my site I have a number of database driven pages as in there is a single page which displays the same page withh different content according to the parameters passed. However this isn't search engine friendly, so I use url rewriting to make it so (using the helicon plugin), which I'm guessing is what you want. Here's a live example from my site: 1. Here is the rewriting rule: RewriteRule ^(.*?flight/)([^_]*) /flight/countryinformation.aspx\?country=$2 [NC] 2. This is what the asp.net database driven page is expecting (the actual real url to the page): "http://www.holidaysflightshotels.com/flight/countryinformation.aspx?country=Russia" 3. And here is the url which I link to display the page (in effect the artifical url, the url cloaking you are after): "http://www.holidaysflightshotels.com/flight/Russia" Basically you can do the same for your site, to get the effect you desire
I just do this <a href="http://www.SATANICAT.com/somethingthatdoesntexistbuttheurlisuperrrrlonganditwouldlookstupidifididntmakeitshorter">http://www.SATANICAT.com/</a> Code (markup): It makes the link look like http://www.SATANICAT.com/ but it sends them to http://www.SATANICAT.com/somethingt...longanditwouldlookstupidifididntmakeitshorter
you know what, I'm thinking that your right and this was what he was after all along and I assumed it was for SEO optimization, and he wanted to hide the url parameters (hence the fancy approach), where as re-reading the question he just wanted to show an easy to read url and nothing else. kind of funny that an obvious answer is missed so easy
Guys, as far as I can tell most of the above wont work as its IIS (asp.net) so does not use htaccess (Apache) ASP.Net URL rewrites can still be done tho' Check this (long) description here http://msdn.microsoft.com/en-us/library/ms972974.aspx for a shorter and more practical description check here - this site btw is a gold mine for MS develpers http://www.codeproject.com/KB/aspnet/urlrewriter.aspx Good luck and let me know if you need any more help