Page 1 of 2 12 LastLast
Results 1 to 10 of 13
Like Tree2Likes

Thread: Need your attention for url rewritting functioning

  1. #1
    Member
    Join Date
    Jun 2011
    Posts
    61
    Thanks
    2
    Thanked 11 Times in 6 Posts
    Rep Power
    2

    Default 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... [Only registered and activated users can see links. Click Here To Register...]

  2. #2
    Senior Member
    Join Date
    Jan 2011
    Posts
    114
    Thanks
    9
    Thanked 2 Times in 2 Posts
    Rep Power
    3

    Default

    Quote Originally Posted by mansi [Only registered and activated users can see links. Click Here To Register...]
    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... [Only registered and activated users can see links. Click Here To Register...]
    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.

  3. #3
    Member
    Join Date
    Jun 2011
    Posts
    61
    Thanks
    2
    Thanked 11 Times in 6 Posts
    Rep Power
    2

    Default

    i try this but not working...


    this warning comes when using 2nd option


    Warning: Cannot modify header information - headers already sent

  4. #4
    Senior Member Ghost's Avatar
    Join Date
    Jan 2007
    Location
    Cardiff, Wales
    Posts
    295
    Thanks
    12
    Thanked 138 Times in 37 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by mansi [Only registered and activated users can see links. Click Here To Register...]
    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 '


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

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

  5. #5
    Member
    Join Date
    Jun 2011
    Posts
    61
    Thanks
    2
    Thanked 11 Times in 6 Posts
    Rep Power
    2

    Default

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

    Quote Originally Posted by Ghost [Only registered and activated users can see links. Click Here To Register...]
    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.

  6. #6
    Senior Member khan's Avatar
    Join Date
    Dec 2009
    Location
    Bangladesh
    Posts
    700
    Thanks
    33
    Thanked 39 Times in 29 Posts
    Rep Power
    4

    Default

    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.
    asifnayem and mansi like this.

  7. #7
    Member
    Join Date
    Jun 2011
    Posts
    61
    Thanks
    2
    Thanked 11 Times in 6 Posts
    Rep Power
    2

    Default

    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..


    Quote Originally Posted by khan [Only registered and activated users can see links. Click Here To Register...]
    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.

  8. #8
    Member
    Join Date
    Jun 2011
    Posts
    61
    Thanks
    2
    Thanked 11 Times in 6 Posts
    Rep Power
    2

    Thumbs up

    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 : [Only registered and activated users can see links. Click Here To Register...]

    once again thanks for your presence..

  9. #9
    Senior Member
    Join Date
    Jan 2011
    Posts
    114
    Thanks
    9
    Thanked 2 Times in 2 Posts
    Rep Power
    3

    Default

    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.

  10. #10
    Member
    Join Date
    Jun 2011
    Posts
    61
    Thanks
    2
    Thanked 11 Times in 6 Posts
    Rep Power
    2

    Default

    Quote Originally Posted by asifnayem [Only registered and activated users can see links. Click Here To Register...]
    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..

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Attention South African wapmasters!
    By laro696 in forum General Discussion
    Replies: 13
    Last Post: 29-06-11, 19:17
  2. Attention please!!!
    By stevebasu in forum Scripts Forum
    Replies: 6
    Last Post: 13-01-11, 09:46
  3. Attention please!!!
    By stevebasu in forum Scripts Forum
    Replies: 11
    Last Post: 31-01-10, 14:43
  4. Guestbook Not Functioning
    By alexism in forum Coding Forum
    Replies: 4
    Last Post: 24-10-07, 13:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19