Need your attention for url rewritting functioning

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

    Need your attention for url rewritting functioning

    hi frnd,, I am trying to make my site look more simple by url rewriting ,, but as i am ok with making refernce from my virtual address to original address...
    like youthmp3.com/char-a.html will actually refer to youthmp3.com/?char=a correctly
    but it does not do what i want , if user open youthmp3.com/?char=a in there browser it acctually show the original address but i want to change this address to virtual address in user browser referring the original address if they choose original address...


    any one pls provide appropriate knowledge or solution for this problem..
    waiting for ur response...


    and you may got my point correctly wisiting this site and see the address bar while searching... mp3skull.com - Free Mp3 Download

    #2
    Originally posted by mansi View Post
    hi frnd,, I am trying to make my site look more simple by url rewriting ,, but as i am ok with making refernce from my virtual address to original address...
    like youthmp3.com/char-a.html will actually refer to youthmp3.com/?char=a correctly
    but it does not do what i want , if user open youthmp3.com/?char=a in there browser it acctually show the original address but i want to change this address to virtual address in user browser referring the original address if they choose original address...


    any one pls provide appropriate knowledge or solution for this problem..
    waiting for ur response...


    and you may got my point correctly wisiting this site and see the address bar while searching... mp3skull.com - Free Mp3 Download
    try these ideas:
    redirect with .htaccess
    PHP Code:
    RewriteEngine On
    redirect 301 
    /index.php?char=$1   http://youthmp3.com/char-(.*).html 
    or redirect with php (put this top of ur page.)
    PHP Code:
    <?php header("Location: http://youthmp3.com/char-a.html"true301); ?>
    Hope this will help.

    Comment


      #3
      i try this but not working...


      this warning comes when using 2nd option


      Warning: Cannot modify header information - headers already sent

      Comment


        #4
        Originally posted by mansi View Post
        i try this but not working...


        this warning comes when using 2nd option


        Warning: Cannot modify header information - headers already sent
        change this
        PHP Code:
        <?php header("Location: http://youthmp3.com/char-a.html"true301); ?>
        //
        //
        //
        to
        PHP Code:
        <?php 
        echo '<meta http-equiv="Refresh" content="0; url=http://youthmp3.com/char-a.html" />'
        ?>
        //
        //
        //
        //
        it will remove the cannot modify header warning.
        <?php
        include ('Ghost');
        if ($Post == true) {
        echo '

        sigpic
        alt='coding-talk.com!!' />';
        echo 'Sharing Is Caring!';
        } else {
        echo '

        alt='the username GHOST has been comprimised!' />';
        echo 'OMG SOMEBODY HELP ME!!';
        }
        ?>

        Comment


          #5
          Is this possible if we want to redirect to same page... like inhex.php to index.html and refer to index.php actually..

          Originally posted by Ghost View Post
          change this
          PHP Code:
          <?php header("Location: http://youthmp3.com/char-a.html"true301); ?>
          //
          //
          //
          to
          PHP Code:
          <?php 
          echo '<meta http-equiv="Refresh" content="0; url=http://youthmp3.com/char-a.html" />'
          ?>
          //
          //
          //
          //
          it will remove the cannot modify header warning.

          Comment


            #6
            Hello,
            This redirect function could come handy to u, if you prefer php redirection.
            PHP Code:
            function redirect($url){
                if (!
            headers_sent()){    //If headers not sent yet... then do php redirect
                    
            header('Location: '.$url); exit;
                }else{                    
            //If headers are sent... do java redirect... if java disabled, do html redirect.
                    
            echo '<script type="text/javascript">';
                    echo 
            'window.location.href="'.$url.'";';
                    echo 
            '</script>';
                    echo 
            '<noscript>';
                    echo 
            '<meta http-equiv="refresh" content="0;url='.$url.'" />';
                    echo 
            '</noscript>'; exit;
                }

            Uses:
            PHP Code:
                $redir "http://yoursite.tld/yourpage.ext";
                echo 
            redirect($redir); 
            As far as I can understand that you are concerning about your page to redirect to the new rules that you created in your .htaccess. you should go for the htaccess codes that ASIFNAYEM gave above. without 301 redirection method, you may face seo problem for duplicate content.

            Comment


              #7
              thank u so mr khan this post really help...
              just one more question i know its may be very silly question.. i want to change user value properly like
              if user enter " helo hw r + u " to something like "helo hw r u" i want to remove all white space character from this and replace multiple space with one space bt there must be no space at the start and end of the string..


              Originally posted by khan View Post
              Hello,
              This redirect function could come handy to u, if you prefer php redirection.
              PHP Code:
              function redirect($url){
                  if (!
              headers_sent()){    //If headers not sent yet... then do php redirect
                      
              header('Location: '.$url); exit;
                  }else{                    
              //If headers are sent... do java redirect... if java disabled, do html redirect.
                      
              echo '<script type="text/javascript">';
                      echo 
              'window.location.href="'.$url.'";';
                      echo 
              '</script>';
                      echo 
              '<noscript>';
                      echo 
              '<meta http-equiv="refresh" content="0;url='.$url.'" />';
                      echo 
              '</noscript>'; exit;
                  }

              Uses:
              PHP Code:
                  $redir "http://yoursite.tld/yourpage.ext";
                  echo 
              redirect($redir); 
              As far as I can understand that you are concerning about your page to redirect to the new rules that you created in your .htaccess. you should go for the htaccess codes that ASIFNAYEM gave above. without 301 redirection method, you may face seo problem for duplicate content.

              Comment


                #8
                here i use this solution in my script
                thanks for your support members...
                I know there must be a better solution to do this.. like submitting value by form after modifying...
                if there is any better solution pls tell me...
                here the link : Ek tha tiger Free Mp3 Download

                once again thanks for your presence..

                Comment


                  #9
                  you could certainly get help from khan bro. he got a site named hitnhot.com. I can see that he use the songspk and musicbd grabber. and he may help you to do things like him.

                  Comment


                    #10
                    Originally posted by asifnayem View Post
                    you could certainly get help from khan bro. he got a site named hitnhot.com. I can see that he use the songspk and musicbd grabber. and he may help you to do things like him.
                    thanks, but i already have much better and functioning script sir..
                    my songs album shows pic and download songs also modified according to them...
                    now i am thinking about to change my mob and pc version of youthmp3 to same address like this coding-talk forum.
                    if you have any knowledge about storing user ip address with a single value only for 1 day pls share,, its helpful for me..

                    Comment


                      #11
                      Originally posted by asifnayem View Post
                      you could certainly get help from khan bro. he got a site named hitnhot.com. I can see that he use the songspk and musicbd grabber. and he may help you to do things like him.
                      Its not a grabber anymore. All the data are in mysql db to get the best use of grabber. no one can ever imagine the songs are taken from other site. Now Its just a simple database connected site. nothing else dude.

                      Hey Mansi, I've visited your site. I think you've done a fantabulous job except the ads. you shouldn't choose popup ads. also you should be more choosy in css design too. your site has contents. if you can redesign or be more slick in your design of the site you can get popularity in no time.

                      Comment


                        #12
                        Originally posted by khan View Post
                        Its not a grabber anymore. All the data are in mysql db to get the best use of grabber. no one can ever imagine the songs are taken from other site. Now Its just a simple database connected site. nothing else dude.

                        Hey Mansi, I've visited your site. I think you've done a fantabulous job except the ads. you shouldn't choose popup ads. also you should be more choosy in css design too. your site has contents. if you can redesign or be more slick in your design of the site you can get popularity in no time.
                        thanks mr khan ,, bt i not add any pop ad in my site...
                        actually its my first time in pc site so i just dnt know what to do with it...
                        ***** is my gmail id ,, may i learn from you if you dnt mind
                        Last edited by arnage; 28.07.12, 11:12.

                        Comment


                          #13
                          Originally posted by khan View Post
                          Its not a grabber anymore. All the data are in mysql db to get the best use of grabber. no one can ever imagine the songs are taken from other site. Now Its just a simple database connected site. nothing else dude.
                          Oh apology. my mistake. though I'm ur regular visitor for online music player.

                          Comment

                          Working...
                          X