Results 1 to 10 of 10

Thread: RewriteRule

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Feb:2013
    Location: Slivnica
    Posts: 5

    RewriteRule

    !
    : page.php?a=var1&b=var2
    , mod_rewrite , :
    domain.com/page/a/var1/b/var2
    , .
    .

  2. #2
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654


    RewriteRule ^page/a/([^/]+)/b/([^/]+)$ page.php?a=$1&b=$2 [QSA,L]

    . . regular expressions - , match- URL-, , , - page.php , $1 "" ( /), $2 . .. GET , "" -.
    -. .

    mod_rewrite.

  3. #3
    Registered User
    Join Date: Feb:2013
    Location: Slivnica
    Posts: 5
    :

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^domain\.com
    RewriteRule ^(.*)$ http://www .domain.com/ [R=301,NC]
    RewriteRule ^page/a/(.*)/b/(.*)$ page?a=$1&b=$2 [QSA,L]

    , .

  4. #4
    a.k.a. Bibi Flower's Avatar
    Join Date: Aug:2006
    Location: Sofia, Bulgaria
    Posts: 562
    ".php"
    RewriteRule ^page/a/(.*)/b/(.*)$ page.php?a=$1&b=$2 [QSA,L]
    tedych -.

    page.php ?

  5. #5
    Registered User
    Join Date: Feb:2013
    Location: Slivnica
    Posts: 5
    ".php" .
    .
    (), .
    .

    RewriteRule ^page/a/(.*)/b/(.*)$ page.php?a=$1&b=$2 [QSA,L]

    tedych, .
    Last edited by Quicksand; 18th February 2013 at 00:09.

  6. #6
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    ? .
    RewriteCond ? , , .

  7. #7
    Registered User
    Join Date: Feb:2013
    Location: Slivnica
    Posts: 5
    www .
    . RewriteCond . . .

  8. #8
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    L :
    RewriteRule ^(.*)$ http://www.domain.com/ [R=301,NC,L]

    htaccess.

    RewriteRule ^(.*)$ page.php?test=$1 [QSA,L]

    test GET .
    , .
    domain.com ? . , . root-a , ..

Posting Permissions

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

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |