SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2010
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help me! Help me ... about Rewrite use .htaccess ???

    I Writed 2 files like :
    1> try.htm
    <html>
    <body>
    <form name="linhpr" action="a.php">
    <input name="try" type = "text" value="" />
    <input type = "submit" value="send" />
    </form>
    <a href="javascript:document.linhpr.submit()">Try</a>
    </body>
    </html>
    2> a.php
    <?php
    $t=$_GET["try"];
    echo"Receive is : $t";
    ?>

    NOW, I want to :
    When you click "Submit" , Or link "Try" then the link will direct to a.html , use file .htaccess
    HELP ME , Thanks EVERYONE

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    69 Post(s)
    Tagged
    0 Thread(s)
    I dont understand what you want it to do, or what it's not doing that you want it to do.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2010
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want to Rewrite link...

  4. #4
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,495
    Mentioned
    161 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by vlbknl2 View Post
    I want to Rewrite link...
    How?
    Give an example of a link, and how you want to rewrite it.

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2010
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want to write file a.php ->a.htm

  6. #6
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1. Change the action property from "a.php" to "a.html".
    2. Use .htaccess file code:
    Code:
    RewriteEngine on
    RewriteRule ^a.html?$ a.php

  7. #7
    SitePoint Enthusiast
    Join Date
    Oct 2010
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks You, Now, I write
    RewriteEngine on
    RewriteRule ^a.html?$ a.php
    RewriteRule ^try/([0-9]*) a.html?try=$1

    I want to write: a.html?try=5 -> try/5
    Link Try : http://muangay001.0fees.net/try.htm
    Help me !

  8. #8
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    vlbknl2,

    You are asking for code like a "script kiddie." Please try to LEARN what mod_rewrite is doing to actually understand the code (and be able to generate it yourself). If you have no place to start, try the tutorial article link in my signature, the basis for the sticky thread in this board.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


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
  •