HTACCESS with php

Discussion in 'PHP' started by ag1357, Apr 3, 2012.

  1. #1
    Hi,

    This is ankur from india i would like to hide my website url using htaccess method please give me a good suggestion which help me to hide url,

    my page url is: http://www.ecmrd.com?id=12&cat=base; i would like to hide this url. I am working under php & mysql environment

    Thanks [​IMG]
     
    ag1357, Apr 3, 2012 IP
  2. ROOFIS

    ROOFIS Well-Known Member

    Messages:
    1,234
    Likes Received:
    30
    Best Answers:
    5
    Trophy Points:
    120
    #2
    ROOFIS, Apr 3, 2012 IP
  3. sandalian

    sandalian Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi, you can visit this site to learn about mod_rewrite.

    http://www.techiepark.com/tutorials/url-rewriting-for-php-web-applications-using-apache-mod_rewrite-extension/ 
    Code (markup):
    There's some examples as well.
     
    sandalian, Apr 3, 2012 IP
  4. chanif.alfath

    chanif.alfath Active Member

    Messages:
    148
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    88
    #4
    chanif.alfath, Apr 4, 2012 IP
  5. Artuurs

    Artuurs Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    usee:
    RewriteEngine on
    RewriteRule ^get/(.*)_([0-9]+)$ scr.php?cat=$1&id=$2
    RewriteRule ^w/([0-9]*)$ news.php?id=$1 [L]
    RewriteRule ^w/$ register.php [L]
    RewriteRule ^w/cw$ inc.php [L]
    RewriteRule ^/add$ add.php [L]
     
    Artuurs, Apr 7, 2012 IP
  6. www.seotest.com

    www.seotest.com Well-Known Member

    Messages:
    77
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    168
    #6
    better is for .htacces this
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    and in index.php you can parse $_SERVER["REQUEST_URI"]
     
    www.seotest.com, Apr 7, 2012 IP