| Welcome to WebmasterWorld Guest from 126.96.36.199 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor|
|Need Help with redirecting print url|
| 12:36 pm on Aug 4, 2013 (gmt 0)|
I removed a print plugin and now the URLs are coming as 404. I need to redirect them to the correct URL
My old URLs were
I want to redirect them to their equivalent
This is the htaccess I created, but it is not working. I put it in the root folder on top of everything else (not many) in the .htaccess, but no success
Am I missing something?
RewriteRule ^(.*)/print/$ /$1 [R=301,NC,L]
| 11:31 am on Aug 5, 2013 (gmt 0)|
that trailing slash in the Pattern won't match the request and for a redirect the Substitution string should be fully qualified with the canonical protocol and hostname.
also, since paths and filenames are case-sensitive on most servers, would also recommend against using the [NC] flag.
| 12:47 pm on Aug 5, 2013 (gmt 0)|
The pattern does not match the example URL.
Look at the trailing slash.
| 2:54 pm on Aug 5, 2013 (gmt 0)|
Should it be
RewriteRule ^(.*)/print /$1 [R=301,L]
| 7:38 pm on Aug 5, 2013 (gmt 0)|
With that code, the target URL will be missing the trailing slash.
RewriteRule ^([^/]+/)print$ http://www.example.com/$1 [R=301,L]
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
© Webmaster World 1996-2013 all rights reserved