Rewrited url (HELP PLEASE)

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

    Rewrited url (HELP PLEASE)

    HELLO friends,

    i need a lil help about rewrite url....
    as we knw that we can rewrite our by using URL ReWrite in .htaccess
    but my question is, how to get values from rewrited URL....

    If your url is
    and we rewrite it as

    now i wanna take 1212 from that url...
    can anyone help me about that...????
    Sandeep DiL (INDIAN)




    #2
    same like you get in normal way ...
    Unamos los corazones,hoy todos somos multicolores!

    Comment


      #3
      You need to use mod rewrite rules in ur htaccess
      Perfection comes at a cost



      I accept liberty!

      Comment


        #4
        here is an example of my htaccess rewrite rules from xchanger.mobi
        Code:
        Options +FollowSymLinks
        RewriteEngine On
        RewriteRule ^up([0-9]+)/?$ /index.php?fileinfoid=$1 [QSA,L]
        RewriteRule ^user([0-9]+)/?$ /index.php?profile=$1 [QSA,L]
        RewriteRule ^u-(.*)/?$ /index.php?uname=$1 [QSA,L]
        RewriteRule ^sess([0-9]+)/fil([0-9]+)/(.*)/?$ /index.php?PHPSESSID=$1&act=fileinfo&fid=$2 [QSA,L]
        RewriteRule ^sess([0-9]+)/afil([0-9]+)/(.*)/?$ /index.php?PHPSESSID=$1&act=warning&fid=$2 [QSA,L]
        RewriteRule ^zipget([0-9]+)/(.*)/(.*)\.zip /download.php?id=$1&tcheck=$2&mod=zip [L]
        RewriteRule ^3gpget([0-9]+)/(.*)/(.*)\.3gp /download.php?id=$1&tcheck=$2&mod=3gp [L]
        RewriteRule ^zc([0-9]+)-n([0-9]+)/(.*)/(.*)\.(.*) /download.php?id=$1&num=$2&tcheck=$3&mod=zipcontent [L]
        RewriteRule ^get([0-9]+)/(.*)/(.*)\.(gif|jpg|jpeg|png|sis|sisx|jar|thm|png|nth|mid|midi|mmf|3gp|avi|mp4|aac|m4a|wav|mp3|amr|mpn|mpc|wbmp|bmp|zip) /download.php?id=$1&tcheck=$2 [L]
        Advertise your mobile site for FREE with AdTwirl

        Comment


          #5
          Wel nice But nowadays people stop using rewrite instead just use a mvc framework to write your code

          Comment


            #6
            Are there any free good ones for php?
            Last edited by frostymarvelous; 13.12.10, 01:09.
            Perfection comes at a cost



            I accept liberty!

            Comment


              #7
              Most frameworks r free :-/ why wud i wanna pay for it when i could just make mine.

              Comment


                #8
                Hi, what is the benefit of MVC framework above .htaccess ??
                tinyurl.com/earnbymobile
                Easy earning for Indians
                ---------------------
                Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
                goo.gl/6vub3

                Comment


                  #9
                  Originally posted by DiL View Post
                  HELLO friends,

                  i need a lil help about rewrite url....
                  as we knw that we can rewrite our by using URL ReWrite in .htaccess
                  but my question is, how to get values from rewrited URL....

                  If your url is

                  and we rewrite it as



                  now i wanna take 1212 from that url...
                  can anyone help me about that...????
                  HTML Code:
                  Options +FollowSymLinks
                  RewriteEngine on
                  RewriteRule (.*)\.html$ index.php?uid=$1
                  sigpic

                  Comment


                    #10
                    how to get the value?

                    $_GET['uid']

                    but i prefer to use a framework

                    Comment


                      #11
                      Yep. The underlying principle of the URL is the same, its just the appearance which has changed. So your script can remain the same. But you should rewrite all your urls to reflect the rule.
                      Perfection comes at a cost



                      I accept liberty!

                      Comment


                        #12
                        It take many w0rks 0n my scripts t0 rewrite all url.. S0 damn
                        our lfe is simple words....
                        http://mygenkz.net
                        ewanz06@yahoo.com
                        PHP Code:
                        $output="i am NOoob....";
                        $newfile="ewanz.txt";
                        $file fopen ($newfile"w");
                        fwrite($file$output);
                        fclose ($file); 

                        Comment


                          #13
                          Well you need to work hard to enjoy
                          Perfection comes at a cost



                          I accept liberty!

                          Comment


                            #14
                            u shudnt expect that to be simple.dnt be lazy

                            Comment


                              #15
                              lazy is my attitude.. huhuhu... what difference use mod rewrited and framework?
                              our lfe is simple words....
                              http://mygenkz.net
                              ewanz06@yahoo.com
                              PHP Code:
                              $output="i am NOoob....";
                              $newfile="ewanz.txt";
                              $file fopen ($newfile"w");
                              fwrite($file$output);
                              fclose ($file); 

                              Comment

                              Working...
                              X