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 1 of 1
  1. #1
    Regular Coder
    Join Date
    Dec 2010
    Location
    London
    Posts
    339
    Thanks
    63
    Thanked 11 Times in 11 Posts

    basic htaccess url re-write problem.

    Hi. I'm new to this .htaccess malarky so if you could confirm whether this is correct i'd really appreciate it.

    this is my .htaccess file;

    Code:
    RewriteEngine on
    RewriteRule ^add/event/$ addevent.php [L]
    RewriteRule ^user/([^/\.]+)/?$ user.php?id=$1 [L]
    And I want these URL re-write's to happen...

    www.mywebsite.com/user.php?id=10
    to
    www.mywebsite.com/user/10

    and

    www.mywebsite.com/addevent.php
    to
    www.mywebsite.com/add/event

    I can't get it working though, is this not correct?

    Many thanks,
    Patrick.
    Last edited by paddyfields; 03-03-2011 at 11:55 AM.


 

Posting Permissions

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