mod rewrighte

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

    #16
    .htacces modrewrite in lavalair user profile in shoutbox seo friendly url.

    Code:
    AddType application/x-httpd-php .htm.html.baz
    AddHandler x-httpd-php .htm.html.baz
    
    Options +FollowSymlinks
    RewriteEngine On
    
    RewriteRule ^user-([0-9]+)-(.*)-(.*).html$ index.php?action=viewuser&who=$1&sid=$3 
    RewriteRule ^shouts-(.*).html$ shouts.php?sid=$1
    RewriteRule ^shout-(.*).html$ shout.php?sid=$1
    
    
    next edit your script to this example in shoutbox
    
    echo "<b>ShoutBox</b><br />";
      $lshout = mysql_fetch_array(mysql_query("SELECT shout, shouter, id  FROM ibwf_shouts ORDER BY shtime DESC LIMIT 1"));
      $shnick = getnick_uid($lshout[1]);
      
      echo "<a href=\"user-$lshout[1]-$shnick-$sid.html\">".$shnick."</a>: ";
      echo parsepm($lshout[0], $sid);
      echo "<br />";
      echo "<a href=\"shouts-$sid.html\">more</a>, ";
      echo "<a href=\"shout-$sid.html\">shout</a>";
    
    clean output
    
    user-1-bazztord-sidhere.html
    shout-sidhere.html
    shouts-sidhere.html
    Last edited by kabooms; 26.05.10, 00:26.

    Comment


      #17
      where i put this mod wrewrite to fucntion/work??

      Comment


        #18
        Originally posted by whitewingz View Post
        where i put this mod wrewrite to fucntion/work??
        simple read my instruction ..add code at .htaccess next edit ur script ..

        Comment


          #19
          ive tryed the code u put here kabooms but all i get is a blank page and the url looking like this http://localhost/profile-1-jsyguy23-...ff760da1b.html

          and done code like this

          RewriteRule ^profile-([0-9]+)-(.*)-(.*).html$ profile.php?userid=$1&ses=$3
          RewriteRule ^history-(.*).html$ history.php?ses=$1
          RewriteRule ^shout-(.*).html$ shout.php?ses=$1

          and links like
          shout-$ses.html
          history-$ses.html

          and so on
          where am i going wrong

          Comment


            #20
            Nice kabooms :P

            Comment


              #21
              Originally posted by jsyguy23 View Post
              ive tryed the code u put here kabooms but all i get is a blank page and the url looking like this http://localhost/profile-1-jsyguy23-...ff760da1b.html

              and done code like this

              RewriteRule ^profile-([0-9]+)-(.*)-(.*).html$ profile.php?userid=$1&ses=$3
              RewriteRule ^history-(.*).html$ history.php?ses=$1
              RewriteRule ^shout-(.*).html$ shout.php?ses=$1

              and links like
              shout-$ses.html
              history-$ses.html

              and so on
              where am i going wrong
              my code work at online before my hosting expire and work perfect at my offline server make sure if enable your offline server for modrerewrite next i think that your script got same error that why you got white screen if error say 500 internal error mean my htaccess modrerwite incorrect pattern..check your code. Later i will post my old index with modrewrite link and .htaccess...

              Comment


                #22
                Try this mate my old lava modify theres a m0drerwite.! http://kabooms.wen.ru/trythis.zip

                Comment


                  #23
                  lol theres nothing wrong with me code works with no mod rewright and sever alows modrerewrite

                  Comment


                    #24
                    Originally posted by jsyguy23 View Post
                    lol theres nothing wrong with me code works with no mod rewright and sever alows modrerewrite
                    Lol i thought your using an offline server bC0Z yoUR site is http://localhost lol ... im just try to help other TNT....

                    Comment


                      #25
                      lol yeah i am lol soz even that zip file u gave me gives blank pages but not sure how to turn modrewright on in this offline sever im useing Web.Developer Server Suite 2.0

                      Comment


                        #26
                        Originally posted by jsyguy23 View Post
                        lol yeah i am lol soz even that zip file u gave me gives blank pages but not sure how to turn modrewright on in this offline sever im useing Web.Developer Server Suite 2.0
                        lol i use ordinary wampserver lol windows os well i just use ordinary lava sql so expect lot of error of that archieve zip file .if you cant see what is that use google to find the answer else junk it and forget it. i cant understand y other people can appriciate other people help...

                        Comment


                          #27
                          ill have to find out how to turn them on lol

                          Comment


                            #28
                            Where How do I create a clean url with php?
                            from: namedomin.com/index.php? action = viewtpc&tid=174
                            become: namedomin.com/url from $tnm
                            and this is his link <a href=\"index.php?action=viewtpc&$tnm\">$tnm </ a>

                            Can anyone help, Please!
                            Last edited by marduck; 25.11.10, 17:42.

                            Comment

                            Working...
                            X