Forum Moderators: phranque
And since I didn't notice for a while, it is now indexed without the extension.
I'd like to permanently redirect references of browse-oceania to browse-oceania.php.
Have tried
RewriteRule ^browse-oceania$ http://www.example.com/browse-oceania.php [R=301,L]
and it appears to do nothing.
I did a simple test with
RewriteRule ^browse-oceania\.html$ http://www.example.com/browse-oceania.php [R=301,L]
and this works.
Have gone through numerous posts and the documentation you refer to but can't seem to find any similar examples or references.
Any suggestions?
Thank you for your time, much appreciated.
[edited by: jdMorgan at 1:26 pm (utc) on Nov. 27, 2006]
[edit reason] No URLs, please. See TOS. [/edit]
RewriteRule ^browse-oceania$ http://www.example.com/browse-oceania.php [R=301,L]
Try this:
RewriteRule ^browse-oceani[b]a/?$[/b] http://www.example.com/browse-oceania.php [R=301,L]
If that doesn't help, then try adding "-MultiViews" to your Options directive if you have one in your .htaccess, or adding the whole line:
Options -MultiViews
I'm assuming that browse-oceania.php resides in the root directory of the site. If not, further adjustments may be needed.
Jim
The
Options -Multiviews
did the job.
Changing it to
RewriteRule ^browse-oceania/?$ http://www.example.com/browse-oceania.php [R=301,L]
was not sufficient.
Any side effects, with setting this option? I did a search, to try to understand exactly what this does but I didn't find a whole lot of info.
I think it's Ok but just want to make sure.
And do you think I should have had to set this? Is this specific to how my ISP has the Apache server configured?
Thanks again for your help.
A surprising number of hosts enable content negotiation by default, despite the fact that it can make a mess of your site's search results due to the potential for duplicate content problems (same content appears for multiple URLs). While duplicate content is not "penalized" per se (in my opinion), it does cause the search engines to pick one URL out of all same-content URLs, and eliminate the rest from their search results. Unfortunately, the URL they pick is often not the one that your prefer.
If you don't know that you use multiviews/content negotiation, then it's very doubtful that you need it.
Jim