Clean URLs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raamay
    New Member
    • Feb 2007
    • 107

    Clean URLs

    i have been trying a hell lot to achieve the task of cleaning my urls but has not been able to succed. I downloaded the example codes from http://www.lucabiagini.com/2008/03/p...friendly-urls/ in order to understand the way and tried it in my machine. But even this example do not work in my machine. Do not work in the sense that when i click on an archive entry i am directed to the url http://localhost/ex/single.php?id=1. This means the url is not in the form as it ought to be.

    I am using WAMP. i am sure this example sampe is working perfectly and there might be some other way to deal for the solution in WAMP. Please advice me!
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    but you have Apache with a working mod_rewrite?

    Comment

    • raamay
      New Member
      • Feb 2007
      • 107

      #3
      Originally posted by Dormilich
      but you have Apache with a working mod_rewrite?
      yes i have done it ............... ............... .

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        what does your .htaccess file look like?

        Comment

        • raamay
          New Member
          • Feb 2007
          • 107

          #5
          infact today i am with somewhat a better picture in understanding the clean urls. In case of me what i wanted was to transform url something like this.
          Code:
          http://www.mysite.com/record.php/202
          instead of
          Code:
          http://www.mysite.com/record.php?id=202
          where the id value is from mysql database.

          People usually have tutorials which teaches us how to write the htaccess file without giving the details of whole scenario. In my case i think its not just writing into htaccess file that will suffice my need. i think we have to write some php script also to achieve this. So, this is what i wanna know?

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            to be honest, I don't see the necessity to use PHP too. usually a correct .htaccess file should do it.

            Comment

            • raamay
              New Member
              • Feb 2007
              • 107

              #7
              Originally posted by Dormilich
              to be honest, I don't see the necessity to use PHP too. usually a correct .htaccess file should do it.
              i see, ok then please direct me how to do it if you dont mind.

              Comment

              • Dormilich
                Recognized Expert Expert
                • Aug 2008
                • 8694

                #8
                read here or here. this should get you started.

                Comment

                • mwasif
                  Recognized Expert Contributor
                  • Jul 2006
                  • 802

                  #9
                  A simple and good tutorial on URL rewriting http://corz.org/serv/tricks/htaccess2.php

                  Comment

                  Working...