by Desh
3 replies
Hi,
Hope someone can help me put
I want to move my store to domain.com/store folder
how do i use 301 redirects to redirect to new location?
also can i place a blog on the root?
and if someone types domain.com they go to domain.com
but any indexed pages are redirected to the new /store folder

I hope I make sense!

Thanks
#301 #redirect
  • Profile picture of the author xrvel
    You can put this PHP code on all code which is not on "/store".

    PHP Code:
    <?php
    header
    ('Location: http://www.domain.com/store'true301);
    ?>
    However there is .htaccess alternative.
    {{ DiscussionBoard.errors[3098970].message }}
  • Profile picture of the author Senesoft
    Your actual store scripts are probably referencing relative paths so it might not be a problem to move the entire store script to the /store folder.

    You could probably just use a .htaccess and apache mod-rewrite. I'm assuming you're running apache.

    Here's a very simple example of a redirect using mod_rewrite

    Options +FollowSymLinks
    RewriteEngine on
    Redirect 301 /index.html /store
    {{ DiscussionBoard.errors[3122475].message }}
  • Profile picture of the author blogdecor
    create a .htaccess file on your initial store folder & paste in it the following :
    redirect 301 / http ://domain.com/store
    {{ DiscussionBoard.errors[3124003].message }}

Trending Topics