Rewriting Url

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Rewriting Url

    I want to rewrite two urls.

    Code:
    some.site.tk/displayone.php?id=595 to 
    some.site.tk/jokes/595.html
    And

    Code:
    some.site.tk/categorize.php?category=Animal to
    some.site.tk/Animal.html
    What do i need to add to .htaccess file?
    Last edited by arnage; 15.04.12, 16:59.

    #2
    Originally posted by Shivam Chawla View Post
    I want to rewrite two urls.

    Code:
    some.site.tk/displayone.php?id=595 to 
    some.site.tk/jokes/595.html
    And

    Code:
    some.site.tk/categorize.php?category=Animal to
    some.site.tk/Animal.html
    What do i need to add to .htaccess file?

    RewriteEngine On
    RewriteRule ^jokes/([^/]*)\.html$ /displayone.php?id=$1 [L]
    RewriteRule ^([^/]*)\.html$ /categorize.php?category=$1 [L]
    This is ten percent luck, twenty percent skill
    Fifteen percent concentrated power of will
    Five percent pleasure, fifty percent pain

    And a hundred percent reason to remember the name!

    Comment


      #3
      Thanks it worked...

      Comment

      Working...
      X