URL rewrite

Discussion in 'Apache' started by figo2476, Jul 31, 2012.

  1. #1
    hi,

    - What I want to do:
    * I have a site e.g. http://mysite.com
    * If someone types http://mysite.com/fake_url, they will be redirected to /var/something/project/index.html (this is outside of mysite directory)
    * The end url will be something like http://mysite.com/project/index.html

    - What I did & it is not working:
    RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]
    RewriteRule ^fake_url/?$ /var/something/project/index.html
     
    figo2476, Jul 31, 2012 IP
  2. maartenvr

    maartenvr Member

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    Do you have a 404 page setup somewhere with a redirect? or in your .htaccess?
     
    maartenvr, Jul 31, 2012 IP
  3. figo2476

    figo2476 Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Something like this:

    # Make Drupal handle any 404 errors.
    ErrorDocument 404 /index.php
     
    figo2476, Jul 31, 2012 IP