redirection issue ..

Discussion in 'Programming' started by sundhararajhan, Jul 27, 2008.

  1. #1
    My existing .htaccess has the following code

    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !/blog(.*)$
    RewriteRule ^(.*)$ http://www.mywesite.co.in/blog/$1 [L,R=301]


    I need to redirect some other url which are indexed in google. But when i use Redirect , its not working ..

    Redirect /mygallery http://www.mywebsite.co.in/blog/xyzgall

    can any one please help me.

    Thanks in advance.
     
    sundhararajhan, Jul 27, 2008 IP
  2. Boxerman

    Boxerman Peon

    Messages:
    306
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

    REPLACE domain.com and www.newdomain.com with your actual domain name.

    .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.
     
    Boxerman, Jul 27, 2008 IP