Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2010
    Location
    Sheffield
    Posts
    824
    Thanks
    93
    Thanked 18 Times in 18 Posts

    Whats wrong with this rewriterule?

    Heres my .htaccess file

    Code:
    RewriteEngine On
    RewriteRule ^faq/([a-Z]+)/([0-9]+)$   faq.php?Title=$1&ID=$2
    RewriteRule ^/?([a-z]+)$ $1.php [L]
    The second line on its own works fine but I cant get the first one to.

    I want it so if the url is faq/Hello/1 the page loads faq.php?Title=Hello&ID=1

    What have i missed/done wrong?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,862
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Try
    Code:
    RewriteRule ^faq/([a-Z]+)/([0-9]+)$   faq.php?Title=$1&ID=$2  [L]
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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