www.webdeveloper.com
Results 1 to 1 of 1

Thread: RewriteRule not working

  1. #1
    Join Date
    Apr 2011
    Posts
    13

    RewriteRule not working

    I've been working with the likes of CSS, HTML, PHP, Javascript, etc. and I've just started using my .htaccess .

    My page's URL looks like this:
    example.com/directory/?id=1
    I want it to look like this:
    example.com/directory/1

    I tried this:
    Code:
    RewriteEngine On
    RewriteRule ^directory/\?id=(.*)$ directory/$1
    Since I'm new to this, I wouldn't know if there's even anything wrong with this code or the syntax.
    Can someone help me please?

    ------

    Edit: Scratch that I just learned how to do it properly. No need for help now :P
    Last edited by dylanwang; 04-30-2011 at 11:09 PM. Reason: question answered

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles