Hi guys, How do I do this? I want a 301 redirect on urls like this - http://www.mydomain.com/folder/anotherfolder/name/asc http://www.mydomain.com/folder/anotherfolder/name/asc/15/15 etc To redirect to this: http://www.mydomain.com/folder/anotherfolder/ Any ideas? Thanks, RJP1
ErrorDocument 404 http://www.mysite.com/404.php Code (markup): redirect 301 /old/old.htm http://www.you.com/new.htm Code (markup):
A 301 redirect is the most efficient and spider/visitor friendly strategy around for web sites that are hosted on servers running Apache. The following code should be placed in the .htaccess file of your root directory: redirect 301 /old/old.htm http://www.you.com/new.htm # redirect 301 (the instruction that the page has moved) # /old/old.htm (the original folder path and file name) # http://www.you.com/new.htm (new path and file name) Code (markup): Good luck.
You can't create a dynamic 301 redirect. If you want a RewriteRule, try the following code: RewriteEngine On RewriteRule ^folder/anotherfolder/([^/]*)$ /folder/anotherfolder/name/asc/$1 [L] Code (markup):
Here is a post with a handy .htaccess redirect generator, might check that out, it's saved me more then one time.