Berlie Posted October 6, 2004 Posted October 6, 2004 I have have a shopping directory that i recently switched the script that was used to run it. As a result the directory structure was changed. I am trying to use the 301 redirect to point the old directory structure to the new one. I was using the cpanel redirect page to create mine and it is not working on some of the redirects. For example: This redirect: Redirect permanent /listings/clothing_apparel/large_tall_sizes http://www.shoppingaide.com/categories/Clo...d_Tall_Clothing When I go to http://www.shoppingaide.com/listings/cloth...arge_tall_sizes It takes me to: http://www.shoppingaide.com/categories/Clo...arge_tall_sizes which doesn't exist and for some reason brings up my index page (not my 404 error page). Any ideas whats wrong? Quote
TCH-Andy Posted October 6, 2004 Posted October 6, 2004 Hi, It looks as if you are redirecting to a directory that does not exist (Clothing_and_Apparel) which is the first problem. You then have a redirect in the directory (categories) that is the parent of your non existent directory.... which redirects (using the .htaccess file) to your index page. I hope that makes sense Quote
Berlie Posted October 6, 2004 Author Posted October 6, 2004 This redirect works: >Redirect permanent /listings/clothing_apparel/mens_clothing http://www.shoppingaide.com/categories/Clothing_and_Apparel/Mens_Clothing But this does not: >Redirect permanent /listings/clothing_apparel/large_tall_sizes http://www.shoppingaide.com/categories/Clothing_and_Apparel/Large_and_Tall_Clothing And the page does exist: http://www.shoppingaide.com/categories/Clo...d_Tall_Clothing But when I go to the page that should redirect >http://www.shoppingaide.com/listings/clothing_apparel/large_tall_sizes It tries to redirect to this URL: >http://www.shoppingaide.com/categories/Clothing_and_Apparel/large_tall_sizes instead of >http://www.shoppingaide.com/categories/Clothing_and_Apparel/Large_and_Tall_Clothing It is putting the end directory from the redirect (large_tall_sizes) at the end of the redirect URL instead of what was entered in the redirect (Large_and_Tall_Clothing) ???? Quote
Berlie Posted October 6, 2004 Author Posted October 6, 2004 PS. the script uses mod rewrite to create these directories. However the redirect seems to work just fine for some.. but not work on others. Here is the .htaccess mod rewrite the script created in case its something in there thats the cause. I don't know much about mod rewrites.. the script created this automatically. >RewriteEngine on # If not working, uncomment and correctly fill the line below: # RewriteBase / RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+[^/])$ $1/ [R] RewriteRule ^admin$ admin/index.php RewriteRule ^admin/$ admin/index.php RewriteRule ^links/([a-z]+)/([0-9]+)$ link.php?action=$1&id=$2 RewriteRule ^links/([a-z]+)/([0-9]+)/$ link.php?action=$1&id=$2 RewriteRule ^links/([0-9]+)$ link.php?id=$1 RewriteRule ^links/([0-9]+)/$ link.php?id=$1 RewriteRule ^thread/([0-9]+)$ comments.php?id=$1 RewriteRule ^thread/([0-9]+)/$ comments.php?id=$1 RewriteRule ^thread/([0-9]+)/([0-9]+)$ comments.php?id=$1&page=$2 RewriteRule ^thread/([0-9]+)/([0-9]+)/$ comments.php?id=$1&page=$2 RewriteRule ^([0-9]+)$ index.php?action=displaycat&catid=$1 RewriteRule ^([0-9]+)/$ index.php?action=displaycat&catid=$1 RewriteRule ^([0-9]+)/([0-9]+)$ index.php?action=displaycat&catid=$1&page=$2 RewriteRule ^([0-9]+)/([0-9]+)/$ index.php?action=displaycat&catid=$1&page=$2 RewriteRule ^([-_/\+A-Za-z0-9]+)$ index.php?action=displaycat&catname=$1 Quote
Berlie Posted October 6, 2004 Author Posted October 6, 2004 Just for kicks here is a list of all of the redirects: http://shoppingaide.com/301notworking.html The ones in bold are the ones that are not working correctly. I can live without them working but I am really curious to know why some work and others don't. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.