Forum Moderators: goodroi
How can I stop these from resolving?
What in particular would I be looking for? There's an overwhelming lot of stuff there
[edited by: goodroi at 11:25 pm (utc) on Mar 3, 2015]
[edit reason] Examplified [/edit]
Some of the pages have page numbers after the .php (?page_num=1)
Does that squash options?
got redirected to the 404 error page on the site.
I want mine yielding this 302.
Why could not you switch these? What would have broken?
Those are two different responses and it's entirely up to you. First version: capture everything up through the extension. If there's additional stuff afterward, redirect to the form without the additional stuff. Second version: if there's stuff after the extension, send a 410 "It ain't here no more" response. You can also manually return a 404 using the locution [R=404,L] but if you use 410 the googlebot will go away faster.
No, you don't. You may choose to return a 301 (earlier in this post) but a 302 should be reserved for redirects that really are temporary, as when a brick-and-mortar business sends you to a different entrance while they're remodeling.
RewriteRule ^([^.]+\.php). http://www.example.com/$1 [R=301,L]
OR
RewriteRule \.php. - [G]