1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.htaccess rewrite help

Discussion in 'PHP' started by zappak, Nov 19, 2011.

  1. #1
    hello

    /usr/local/apache/htdocs

    re rewrite to

    /usr/local/apache/htdocs/tempdir

    Can anyone suggest ??

    thanks in advance :)
     
    zappak, Nov 19, 2011 IP
  2. eleetgeek

    eleetgeek Peon

    Messages:
    129
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Instead.

    Why do not add a header on your index.php file?
    
    header('location: http://yoursite.com/to-this-redirect');
    
    PHP:
     
    eleetgeek, Nov 19, 2011 IP
  3. zappak

    zappak Active Member

    Messages:
    366
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    80
    #3
    Thanks for reply.. but No, I want url rewrite..

    check 216.172.190.8/~psbeyond/

    may be you got it.
     
    zappak, Nov 19, 2011 IP
  4. rainborick

    rainborick Well-Known Member

    Messages:
    424
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    120
    #4
    I'm not an expert with .htaccess code, but you could try:
    [/code]
    RewriteCond %{REQUEST_URI} (.*)
    RewriteRule (.*) /tempdir/$1 [L]
    [/code]
    This should effectively add "/tempdir/" to the beginning of all HTTP requests to your server. If you only want to redirect URLs in the root directory, you'll need to find someone better at writing this stuff. Good luck!
     
    rainborick, Nov 19, 2011 IP
  5. zappak

    zappak Active Member

    Messages:
    366
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    80
    #5
    Thanks for that..but it's not working

    showing 500 Internal Server Error

    216.172.190.8/~psbeyond/

     
    zappak, Nov 19, 2011 IP
  6. zappak

    zappak Active Member

    Messages:
    366
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    80
    #6
    anyone who is expert in this thing??
     
    zappak, Nov 19, 2011 IP
  7. kristenmorey111

    kristenmorey111 Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    please check out this tutorial...http://corz.org/serv/tricks/htaccess2.php I also learned from there :)
     
    kristenmorey111, Nov 20, 2011 IP