mod_rewrite .htaccess help needed urgent.

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

    mod_rewrite .htaccess help needed urgent.

    hi help me i want 2 make ur in .html

    http://songsvilla.tk/hindi/?dir=Mp3%20Songs/Hindi%20Songs&start=1

    like

    http://songsvilla.tk/hindi/Mp3%20Songs/Hindi%20Songs.html

    any idea 2 make this pls help me.

    #2
    I am not sure if you want this or not,
    but personally I use this method:

    Code:
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* index.php
    So, whatever you typo on the url, it will be executed on index.php
    Then you need to get the url from $_SESSION, explode it according to "/" and process it.

    OR

    Code:
    RewriteEngine on
    RewriteRule ^hindi/([^/\.]+)/([^/\.]+)/([^/\.]+).html?$ index.php?page=hindi&dir=$1/$2&page=$3 [L]
    You won't get it working if you don't understand its logic!
    Last edited by arnage; 10.10.12, 08:43.
    mysterio.al - programming is a functional art

    Comment


      #3
      Code:
      RewriteEngine On
      RewriteRule ^hindi/([^/]*)/([^/]*)\.html$ /hindi/?dir=$1&start=$2 [L]
      The original URL:
      Code:
      http://songsvilla.tk/hindi/?dir=Mp3 Songs/Hindi Songs&start=1
      The rewritten URL:
      Code:
      http://songsvilla.tk/hindi/Mp3 Songs/Hindi Songs/1.html
      Last edited by arnage; 10.10.12, 08:44.

      Comment


        #4
        Originally posted by eminem View Post
        RewriteEngine On
        RewriteRule ^hindi/([^/]*)/([^/]*)\.html$ /hindi/?dir=$1&start=$2 [L]

        The original URL:
        Mp3 | iSongs.TK Songs/Hindi Songs&start=1
        The rewritten URL:
        http://songsvilla.tk/hindi/Mp3 Songs/Hindi Songs/1.html

        Bro i put dis code in my .htaccess
        But still nt wrkng so any other idea.

        Comment


          #5
          Hey guys pls help me check this .htaccess code, it displays Internal Server Error...
          Code:
           
          <IfModule mod_rewrite.c>
            RewriteEngine on
          # RewriteBase physical-directory-path
           RewriteRule ^mod_rewrite.test$ mod_rewrite_test.php 
          </IfModule>
          Pls someone should help me out...urgent help needed pls!

          Comment


            #6
            try this


            Code:
            RewriteRule ^hindi/([^/]+).html /index.php?dir=$1&start=1 [NC]
            next time give your full damn query with file.php name !

            you can use eminem's rewrite code if you want to use another start element and not one set up by default , just put index.php before question sign ? !
            Last edited by arnage; 10.10.12, 08:45.
            This is ten percent luck, twenty percent skill
            Fifteen percent concentrated power of will
            Five percent pleasure, fifty percent pain

            And a hundred percent reason to remember the name!

            Comment


              #7
              Originally posted by just_m3. View Post
              try this


              RewriteRule ^hindi/([^/]+).html /index.php?dir=$1&start=1 [NC]

              next time give your full damn query with file.php name !

              you can use eminem's rewrite code if you want to use another start element and not one set up by default , just put index.php before question sign ? !
              Still Nt Wrkng.

              Comment


                #8
                Its working, it just you need to add that rewrite change in all links in the script. Half way there...
                <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

                Comment

                Working...
                X