Looking for some advice on 301 redirects trying to eliminate external page (not Miva pages) requests.
This works:
Redirect 301 /misc/ http://mydomain.com/mm5/merchant.mvc...SC&screen=CTGY
We want this next one to resolve in the upper level category MISC. But This doesn't work:
Redirect 301 /misc/oldmiscpage.htm http://mydomain.com/mm5/merchant.mvc...SC&screen=CTGY
The result is a not found page because oldmiscpage.htm is being concatenate to the new URI, so the NTFD message is that CTGYoldmiscpage.htm isn't found. The same NTFD renders when using a sub-directory.
Redirect 301 /misc/sub1misc http://mydomain.com/mm5/merchant.mvc...SC&screen=CTGY
The NTFD message is that CTGYsub1misc isn't found.
So, I can only use one folder that redirects as expected.
Every example and instruction I've found has me thinking the scenario should work as planned. But doesn't seem to work.
Extending the question, Idealy, these external pages will have a pattern of /misc/*.htm to be redirected. I'd like to be able to use a wildcard scenario to handle all the sub-directories and files in 1 redirect command if it is possible.
This has evolved into trying something like this:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([^/.]+).htm$ http://mydomain.com/mm5/merchant.mvc?Store_Code=MYCODE&screen=CTGY&categor y_code=$1-CTGYSTRCODE [R=301,NC]
because the uri can have sub folders as in: /misc/oldmiscpage.htm, I've also tried:
RewriteRule ^([^/]+)/([^/.]+).htm$ http://mydomain.com/mm5/merchant.mvc?Store_Code=MYCODE&screen=CTGY&categor y_code=$2-CTGYSTRCODE [R=301,NC]
What are other things I could try/do?
Thanks,
Scott
This works:
Redirect 301 /misc/ http://mydomain.com/mm5/merchant.mvc...SC&screen=CTGY
We want this next one to resolve in the upper level category MISC. But This doesn't work:
Redirect 301 /misc/oldmiscpage.htm http://mydomain.com/mm5/merchant.mvc...SC&screen=CTGY
The result is a not found page because oldmiscpage.htm is being concatenate to the new URI, so the NTFD message is that CTGYoldmiscpage.htm isn't found. The same NTFD renders when using a sub-directory.
Redirect 301 /misc/sub1misc http://mydomain.com/mm5/merchant.mvc...SC&screen=CTGY
The NTFD message is that CTGYsub1misc isn't found.
So, I can only use one folder that redirects as expected.
Every example and instruction I've found has me thinking the scenario should work as planned. But doesn't seem to work.
Extending the question, Idealy, these external pages will have a pattern of /misc/*.htm to be redirected. I'd like to be able to use a wildcard scenario to handle all the sub-directories and files in 1 redirect command if it is possible.
This has evolved into trying something like this:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([^/.]+).htm$ http://mydomain.com/mm5/merchant.mvc?Store_Code=MYCODE&screen=CTGY&categor y_code=$1-CTGYSTRCODE [R=301,NC]
because the uri can have sub folders as in: /misc/oldmiscpage.htm, I've also tried:
RewriteRule ^([^/]+)/([^/.]+).htm$ http://mydomain.com/mm5/merchant.mvc?Store_Code=MYCODE&screen=CTGY&categor y_code=$2-CTGYSTRCODE [R=301,NC]
What are other things I could try/do?
Thanks,
Scott
Comment