Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Moving from catalog directory to root


Recommended Posts

Currently I have our store installed in the /catalog/ directory, and I want to move it over to the root / directory in attempt to be more "liked" by search engines. My concern is that we're already indexed on Yahoo with the /catalog/ links, so I want those links to redirect to the new location in a seemless way to visitors.


I assume this will be done via the htaccess file, but I'm not sure how to go about it. Can somebody please let me know what I need to put in my htaccess in order to achieve this move seemlessly? Here is my current file (I have the SEO Rewrite mod installed)


# $Id: .htaccess,v 1.2 2003/09/24 13:57:00 wilt Exp $
# This is used with Apache WebServers
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
# Example:
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

<IfModule mod_setenvif.c>
 <IfDefine SSL>
   SetEnvIf User-Agent ".*MSIE.*" \
            nokeepalive ssl-unclean-shutdown \
            downgrade-1.0 force-response-1.0

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)

<IfModule mod_php4.c>
 php_value session.use_trans_sid 0
 php_value register_globals 1
 php_flag display_errors On
 php_flag track_errors On

Options +FollowSymLinks
RewriteEngine On 
RewriteBase /catalog/
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}


I assume it will be a one-liner, something like...

Redirect /catalog /

Obviosly, it needs to pass the URL parameters along with it. Any advice? And how will this effect the SEO URL Rewrites?

Link to comment
Share on other sites

Any ideas? It's been suggested elsewhere to use a Rewrite rather than Redirect... but wouldn't a Rewrite simply change the "look" of the URL, but not actually point the old (nonexistent) /catalog/ directory to root?

Link to comment
Share on other sites

See these threads on redirect permanent.


No need to get fancy with mod rewite but maybe it would save you physically moving the files at the cost of some slight loss in performance. It does take the parameters with it but I haven't tried it myself with the SEO rewrite mod

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...