masking a url

Discussion in 'PHP' started by webboy, Jul 17, 2007.

  1. #1
    webboy, Jul 17, 2007 IP
  2. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #2
    I suppose you remove [R=301,L] and leave [L] only. Wordpress does it like that:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    You can get request string by using $_SERVER['REQUEST_URI']
     
    AsHinE, Jul 18, 2007 IP
  3. webboy

    webboy Peon

    Messages:
    109
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi all just getting back to this i am still seeing the full redirected url in the url bar
    the coding looks like this

    RewriteEngine on
    RewriteBase /public_html/keyword
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{HTTP_HOST} ^keyword.www.mydomain.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.keyword.mydomain.com$
    RewriteRule ^(.*)$ http://www.mydomain.com/wordpress-mu-1.5.1 [L]

    the goal is that i wish to have wordpress mu with a subdomain eg keyword.mydomain.com
    but its displaying wordpress-mu-1.5.1 when i redirect the url
    also is does not append the string after it
     
    webboy, Jul 14, 2008 IP
  4. chanakya

    chanakya Peon

    Messages:
    361
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    1) You need to redirect the mask url, The non-masked url will not automatically convert to the masked one.

    2) You must be needing to pass values of iD and cat , You are not doing that
     
    chanakya, Jul 15, 2008 IP
  5. webboy

    webboy Peon

    Messages:
    109
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i added $1 on the end and that passed the values to the url (Fixed)
     
    webboy, Jul 15, 2008 IP