.htaccess Redirect help

Discussion in 'Apache' started by solikesimon, May 7, 2012.

  1. #1
    I'm trying to do a .htaccess Redirect that looks like:
    Redirect /foo SITEURL/bar.html
    But when I try to access SITEURL/foo it brings up the URL SITEURL/bar.html?q=foo which shows my initial page /foo and not my redirected page.

    my .htaccess looks like:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www
    RewriteRule ^(.*)$ SITEURL/$1 R=301,L]
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    I'm guessing the last line is what is doing it, but that line needs to be there to enable friendly url's for the CMS (Etomite).

    So how can I make my redirect work the way that I want it?

    Thanks!

     
    solikesimon, May 7, 2012 IP