301 redirect in sub folder

Discussion in 'Search Engine Optimization' started by TheGrinch, Jan 28, 2011.

  1. #1
    TheGrinch, Jan 28, 2011 IP
  2. SeoServe

    SeoServe Active Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #2
    You should create (or modify) .htaccess file in xyz directory.
    Try to input there:

    RewriteEngine on
    RewriteRule ^index\.html /xyz/index\.php
     
    SeoServe, Jan 28, 2011 IP
  3. billybear

    billybear Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do you need to keep index.html? Why not just delete it?

    Otherwise just use rewrite rule in your root htaccess -

    RewriteRule ^xyz/index\.html$ http://www.yourdomain.com/xyz/index.php [R=301,L]
    Code (markup):
     
    billybear, Jan 28, 2011 IP
  4. TheGrinch

    TheGrinch Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Oops! I just realised I made a slight mistake in my original post.
    I actually wanted a redirect from /xyz / to /xyz/index.php

    Thanks billybear you were spot on - Cheers
     
    TheGrinch, Jan 28, 2011 IP