Forum Moderators: phranque

Message Too Old, No Replies

Why does this fail?

         

rocknbil

9:29 pm on Jun 2, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Seems simple enough. But fails, drives me nuts.

RewriteRule ^furniture-products/conference-presentation-and-training$ /furniture-products/conference/ [R=301,L]

Also tried

RewriteRule ^\/*furniture-products\/conference-presentation-and-training\/*$ /furniture-products/conference/ [R=301,L]
RewriteRule ^\/*furniture\-products\/conference\-presentation\-and\-training\/*$ /furniture-products/conference/ [R=301,L]

RewriteCond %{REQUEST_URI} furniture-products/conference-presentation-and-training
RewriteRule .* /furniture-products/conference/ [R=301,L]

edit: Never mind, you may delete or let stand as a testimonial of idiocy, to check the most obvious first . . . . I was focused on the pattern, looking and looking to the left . . . then on the right noticed

.../[R=301,L]

There is no directory [R=301,L]. Missing a space. .../ [R=301,L] <facepalm X 1000>

lucy24

10:04 pm on Jun 2, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you don't mind, I'm doing to sit here and scream with excitement at discovering an htaccess error that I have never made.

:: wandering off to paste red letter on calendar ::

g1smd

11:53 pm on Jun 2, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There's one further error.

You should add the protocol and domain name to the redirect target.

RewriteRule ^furniture-products/conference-presentation-and-training http://www.example.com/furniture-products/conference/ [R=301,L]


If this is the URL for a "page" it should not have a trailing slash.