Mod_rewrite!

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

    Mod_rewrite!

    Ohk guys can anyone here can explain me how to use mod_rewrite in .htaccess file.!
    What i exactly want is


    My url is www.mysite.com/index.php?cat=1


    I want it to be www.mysite.com/1/

    i know it can be done.

    but i really don't have an idea.

    because ?cat=1
    is not secure.
    So anyone out there out to help me?

    #2
    PHP Code:
    RewriteEngine On 
    RewriteRule 
    ^/(.*)/$ /index.php?cat=$
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #3
      Originally posted by subzero View Post
      PHP Code:
      RewriteEngine On 
      RewriteRule 
      ^/(.*)/$ /index.php?cat=$
      how is it supposed to work bro?

      Comment


        #4
        Go here

        Host4u.me

        Now click Order but not click it but look :P
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          ahhh i get it :D lol
          thnks subz
          you always der man :D

          Comment


            #6
            Code:
            RewriteRule ^(.*)\.php$ /$1.html [R=301,L]
            Code:
            Options +FollowSymLinks
            RewriteEngine On
            RewriteBase /
             
            RewriteRule !\.(html|php)$ - [S=4]
            RewriteRule ^([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4-$5 [E=uscor:Yes]
            RewriteRule ^([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4 [E=uscor:Yes]
            RewriteRule ^([^_]*)_([^_]*)_(.*)$ $1-$2-$3 [E=uscor:Yes]
            RewriteRule ^([^_]*)_(.*)$ $1-$2 [E=uscor:Yes]
             
            RewriteCond %{ENV:uscor} ^Yes$
            RewriteRule (.*) http://d.com/$1 [R=301,L]

            Comment

            Working...
            X