Results 1 to 13 of 13

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654

    mod_rewrite RewriteRule

    URL rewriting, , .htaccess.
    , Windows, URL rewrite Microsoft, mod_rewrite, , - htaccess, 2-3 .. .

    IPB3 friendly urls , mod_rewrite, 3 , 2 RewriteCond.
    , .
    RewriteRule, ( ):

    Code:
    RewriteBase /ipb305retail/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /ipb305retail/index.php [L]
    "" , URL . , . ..
    htaccess IPB, forum/topic/123-tema-zaglavie
    .

  2. #2
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138

    RewriteBase , URL-. , /project Rewrite Rule :
    RewriteRule ^admin/$ index.php?page=admin, rewritebase, index.php , base, root-a.

    , ( AND , OR [OR] ).

    RewriteCond %{REQUEST_FILENAME} !-f
    , URL- , - -.
    RewriteCond %{REQUEST_FILENAME} !-d
    , - -

    - -, 1 index.php.
    RewriteRule . /ipb305retail/index.php [L]

    . dispatcher url-.


    P.S. :
    http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
    ''? * *
    - !
    ...

  3. #3
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    vbTheKing, .
    , , . mod_rewrite , .htaccess- (, 30-40 , '' , , ).

    " - -, 1 index.php."
    - - (- 1 . ).
    Rule
    forum/topic/123-my-topic
    , (/ipb305retail/index.php) .
    M rewriting-, , ..
    .
    Last edited by tedych; 23rd April 2010 at 23:15.

  4. #4
    Pesho's Avatar
    Join Date: Nov:2001
    Location: Sofia
    Posts: 5,169
    Quote Originally Posted by tedych View Post
    Rule
    forum/topic/123-my-topic
    , 1 ( ), (/ipb305retail/index.php) .

    .

    , vb e 99% , 100%. :

    - -, 1 index.php.
    RewriteRule . /ipb305retail/index.php [L]
    . ^.$, 1-. IPB, , .*

    , HTTP , URL.
    , !

  5. #5
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    Pesho, , , "" .
    , , ** , request_uri -.
    rewriterule, URI _GET , .

    IPB, , . , , , , .. safety measure , -.

  6. #6
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138
    Quote Originally Posted by tedych View Post
    mod_rewrite , .htaccess- (, 30-40 , '' , , ).
    - , 400 , , .

    Quote Originally Posted by Pesho View Post
    , vb e 99% , 100%. :

    - -, 1 index.php.
    RewriteRule . /ipb305retail/index.php [L]
    , , 100% , . - , . () ( ), " 1 ". , - 1 - +, .. .+ (, ).
    + -
    ? -
    * -

    , IPB, , -. .
    :
    RewriteRule (.) /ipb305retail/index.php?url=$1 [L]
    GET URL. * - URL.

    Quote Originally Posted by tedych View Post
    , , ** , request_uri -.
    , , , requrst_uri . , .

    cheat sheet mod_rewrite
    http://www.addedbytes.com/cheat-shee...t-sheet-v2.png
    ''? * *
    - !
    ...

  7. #7
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    , , - request_uri .
    , , .htaccess-a ( 30-40 ) , , , URI- , , , , request_uri.
    Request_uri query string-a, . , rewrite , - .

    ""-, . , "", , 1 , 1 "", "". RewriteRule . /index.php RewriteRule .+ index.php . - .

    . - rewriterule , request_uri- .
    URI , , .

    vbTheKing, ? htaccess, ? , , .. php , , mod_rewrite. , - , Windows ( ), rewriting, , htaccess .
    Last edited by tedych; 24th April 2010 at 02:28.

  8. #8
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138
    Quote Originally Posted by tedych View Post
    vbTheKing, ? htaccess, ? , , .. php , , mod_rewrite. , - , Windows ( ), rewriting, , htaccess .
    /, , htaccess-a 10- , sensitive dirs/files, , / www ., , , index.php.
    index.php dispatcher, (, , error handler, debug logger, ..), - , , , .. , request_uri-, , .
    htaccess-a, , , , , htaccess-a, . - - , htaccess-a - , .
    , rewrite-a, htaccess . -, , IF url- , . wordpress, , . friendly urls .

    Quote Originally Posted by z0ne View Post
    - HTTP .htaccess, Error 403 / Error 404 . .
    -?
    , - , , ,
    <?php header("HTTP/1.1 404 Not Found"); ?> <?php Header( "HTTP/1.1 301 Moved Permanently" ); ?>
    .
    , htaccess-a - , , .
    :
    Code:
    RewriteRule ^([a-z])*/([0-9]+)/+$ index.php?module=$1&id=$2 [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . - [F,L]
    , .
    Quote Originally Posted by tedych View Post
    vbTheKing .. - htaccess-a, ..
    , , - . scalable , htaccess-a . , , , , .
    - htaccess, .
    ''? * *
    - !
    ...

  9. #9
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    , MOD_REWRITE ? .. :

    www.site.com/2/test.html

    2 -> INT ([0-9]) char .

  10. #10
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    z0ne, ( PHP), mod_rewrite , preg_match- URI- " " , .htaccess-a.
    , , mod_rewrite, flow-a .

  11. #11
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    - HTTP .htaccess, Error 403 / Error 404 . .

  12. #12
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    , , , ( , - ), - , , / www/index.php .. .
    - vbTheKing .. - htaccess-a, ..

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

    " htaccess-a, , , , , htaccess-a, "
    - , , URL-, , request_uri ( ), . , - mod_rewrite.

    " , rewrite-a, htaccess "
    - RewriteEngine On/Off .
    , / rewriting-a, - htaccess, .

    , -, Windows , ..
    , "" . , , - , - , .

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 |