Results 1 to 7 of 7

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User DonDale's Avatar
    Join Date: Nov:2008
    Location: Bulgaria
    Posts: 126

    .htaccess RewriteRule

    ,
    , .

    :
    :
    www.<URL>.eu/catalog.php?cat=3
    , :
    www.<URL>.eu/catalog/category/3

    .htaccess, , . http://<URL>.eu http://www.<URL>.eu

    , .

    , .

    Code:
    <IfModule mod_rewrite.c>
        RewriteEngine On
        
        RewriteCond %{HTTP_HOST} ^<URL>\.eu [nc]
        RewriteRule (.*) http://www.<URL>.eu/$1 [R=301,L]
        
        RewriteRule ^category/([a-zA-Z0-9\-]+)/([0-9]+) /catalog.php?cat=$3 [nc]
    </IfModule>
    .

  2. #2
    O HAI !!! RazorGL's Avatar
    Join Date: Aug:2005
    Location:
    Posts: 367
    :


    :
    Code:
    RewriteRule catalog/(.*)/(.*)/$ /catalog.php?$1=$2
    :
    {domain}/catalog.php?category=3
    ==
    {domain}/catalog/category/3

    "category".

  3. #3
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    (.*) => ([0-9]+)

    -, .

  4. #4
    lʎqouɹǝɥɔ ʎq pǝ,ɔo InfraRed's Avatar
    Join Date: Jan:2006
    Location: /
    Posts: 3,670
    , category=3, item=5:

    Code:
    RewriteRule ^catalog/([a-zA-Z0-9_\-]+)/([0-9]+)/$ catalog.php?$1=$2
    - , category , , , .
    my-Category_345

    catalog.php?category=3 => catalog/category/3
    catalog.php?cat=3 => catalog/cat/3
    catalog.php?item=5 => catalog.php/item/5

    , category, :

    Code:
    RewriteRule ^catalog/category/([0-9]+)/$ catalog.php?cat=$1
    FX-8350 | X4 965 | X6 1090T | X2 555 | Athlon II X2 250 | Sempron 145 | i5 2500K | i7 3770K | DDR-881
    XOCT Bulgaria | B4K Enhanced | Shure SRH1540 & SHR840 | Audioengine D1 + Mackie MR624

  5. #5
    Registered User
    Join Date: Jul:2005
    Location: Sofiq
    Posts: 2,798
    :
    Code:
    RewriteRule ^catalog/([^/\.\?]+)/([^/\.\?]+)/?$ catalog.php?$1=$2
    :
    catalog/cat/cat_key/ -> catalog.php?cat=cat_key
    catalog/cat/cat_key -> catalog.php?cat=cat_key

    id- url-.

  6. #6
    Ma57eR's Avatar
    Join Date: May:2007
    Location:
    Posts: 414
    ID-, /

  7. #7
    Registered User DonDale's Avatar
    Join Date: Nov:2008
    Location: Bulgaria
    Posts: 126

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 |