Forum Moderators: phranque

Message Too Old, No Replies

Remove an extra question mark from url

How do I remove a /?/ from my url

         

bustherh

11:25 pm on Dec 10, 2009 (gmt 0)

10+ Year Member



I have a problem with wordpress,
Everytime someone finds a link to my site on a search engine the link shows up like this:
http://example.com/?/ecigs/dragonfly/

When it should be like this:
http://example.com/ecigs/dragonfly/

There is an extra question mark that should not be there, I have spent a lot of time on the wordpress forum and I cannot find any answer to this.
I also don't really know anything about how to write a proper .htaccess file.

Is there a way that I can add something to the .htaccess file that would change this: http://example.com/?/
To This:
http://example.com/
so that the links on google and other search engines will be redirected to the page that the search is actually referencing.

[edited by: jdMorgan at 2:55 pm (utc) on Dec. 11, 2009]
[edit reason] example.com [/edit]

g1smd

2:38 am on Dec 11, 2009 (gmt 0)

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



Since everything after the ? is treated as being a QUERY_STRING the solution in this thread from a couple of hours ago will (with a small amount of adapting) do the job:

[webmasterworld.com...]

You also need to find where links with that URL within are being generated and fix those links to point to the correct URL.

jdMorgan

3:03 pm on Dec 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I want to re-iterate and emphasize what g1smd just said:

The first step is to find out where those 'bad' links are being published. If they're being published on your own site, then they must be fixed there if you care about search engine ranking.

To apply an after-the-fact server-side code fix instead of fixing the cause of the problem is somewhat like paying for an ambulance to remain all day every day at a construction site waiting for accidents, instead of issuing hard-hats and other basic safety equipment to the workers; The injuries will continue, even if they are immediately treated, and some will be serious despite attempted treatment.

Fix the source of the problem and then, if necessary, add server-side code to speed up the correction of the 'bad' URLs in the search results listings -- That's the only purpose and possible function of the server-side code, and implementing it can/should be considered to be optional.

Jim