Cloaking URLs

Discussion in 'Programming' started by backlinkpal, Jun 24, 2008.

  1. #1
    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?
     
    backlinkpal, Jun 24, 2008 IP
  2. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #2
    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
     
    Vooler, Jun 24, 2008 IP
  3. backlinkpal

    backlinkpal Peon

    Messages:
    322
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I was aware that something called mod rewrite is possible for Apache/PHP. However, is there an alternative for ASP.NET?
     
    backlinkpal, Jun 24, 2008 IP
  4. azlanhussain

    azlanhussain Active Member

    Messages:
    640
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #4
    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,
     
    azlanhussain, Jun 24, 2008 IP
  5. bokiatenxi

    bokiatenxi Peon

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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
     
    bokiatenxi, Jun 25, 2008 IP
  6. pravvish

    pravvish Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    i have a free script that can hide the real url .... i can give it to you if u want ...
     
    pravvish, Jun 25, 2008 IP
  7. itnashvilleCOM

    itnashvilleCOM Banned

    Messages:
    176
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #7
    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):


     
    itnashvilleCOM, Jun 25, 2008 IP
  8. dilzsaran

    dilzsaran Well-Known Member

    Messages:
    196
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    103
    #8
    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
     
    dilzsaran, Jun 25, 2008 IP
  9. roym

    roym Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    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.
     
    roym, Jun 25, 2008 IP
  10. backlinkpal

    backlinkpal Peon

    Messages:
    322
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Anyone know?
     
    backlinkpal, Jun 27, 2008 IP
  11. roym

    roym Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    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
     
    roym, Jun 27, 2008 IP
  12. SATANICAT

    SATANICAT Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    SATANICAT, Jun 27, 2008 IP
  13. roym

    roym Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #13
    you know what, I'm thinking that your right and this was what he was after all along :eek: 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 :D
     
    roym, Jun 27, 2008 IP
  14. drax2006

    drax2006 Well-Known Member

    Messages:
    233
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    118
    #14
    drax2006, Jun 28, 2008 IP
  15. backlinkpal

    backlinkpal Peon

    Messages:
    322
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Actually no. I was really after the URL rewrite in ASP.
     
    backlinkpal, Jun 28, 2008 IP
  16. roym

    roym Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    ah, okay :D then go with the helicon plugin, works a treat at least for me.
     
    roym, Jun 28, 2008 IP