www.webdeveloper.com
Results 1 to 4 of 4

Thread: .htaccess mod_rewrite rules

  1. #1
    Join Date
    May 2006
    Posts
    138

    .htaccess mod_rewrite rules

    I googled alot of examples and can't get additional strings to work

    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^server\.com
    RewriteRule (.*) http://www.server.com/$1 [R=301,L]
    RewriteRule (.*)/$ url.php?loc=$1
    Options +FollowSymLinks
    so if you go to server.com/file/ work fine, but I want to add additional &strings and can't get them to work.

    I would like to add other options:
    url.php?loc=$1&unit=$2 (as) server.com/file:unit/

    My second question, say my second tier isn't always "unit" say its "set" do I have to add another rewrite line for that claus? server.com/file:set/

    Any help would be much appreciated...

  2. #2
    Join Date
    Nov 2007
    Posts
    140
    The QSA flag may be what you're looking for.

    http://rewrite.drbacchus.com/rewritewiki/Flags_2fQSA

  3. #3
    Join Date
    Mar 2009
    Location
    Texas
    Posts
    124
    tfk11: i get a page error when trying to load that link...

  4. #4
    Join Date
    Nov 2007
    Posts
    140
    Works for me... if you can't get it to work try this one.

    http://lmgtfy.com/?q=mod_rewrite+qsa+flag

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