SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict scoobasteve1982's Avatar
    Join Date
    Apr 2007
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    htaccess not rewriting my urls

    Hi there,

    I'm attempting to rewrite a URL using the following htaccess directives however nothing happens. Does anyone know what I'm doing wrong?

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    
    RewriteRule -mls-(.*)-pt-(.*)\.php view_search_listing.php?mls=$1&pt=$2

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Rewrite rules tell Apache how to handle incoming requests, they don't change any of the links on your site.

    Neither will a rewrite rule, without a redirect flag, change the URL seen in the address bar of the browser.
    Last edited by Dan Grossman; Dec 17, 2009 at 17:37.

  3. #3
    SitePoint Addict scoobasteve1982's Avatar
    Join Date
    Apr 2007
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dan - thank you sir! Makes sense now!

  4. #4
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Additionally,
    Many novice has confusions regarding apache's url rewriting even i had some confusions earlier. What Apache's url rewriting does is it just implicitly maps the request to our existing files like what Dan Grossman has mentioned.


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
  •