Forum Moderators: phranque

Message Too Old, No Replies

re-write query string

any ideas?

         

thecleaner

9:29 pm on Jun 26, 2007 (gmt 0)

10+ Year Member




Its currently

search.php?keyword=widjet+widjet+widjet=&Submit=Search

Can I do a mod-rewrite on this?

Also, How do I make sure it does not get indexed by search engines once I change it?

thanks in advance

jdMorgan

9:41 pm on Jun 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you can rewrite that.

But no, it will be indexed by search engines as long as they find it as a link on your page(s).

If you're looking to make search-engine-friendly URLs, you must change the the links on your pages, then rewrite (not redirect) the new search-friendly links back to the form needed by your script. You can then optionally redirect direct client requests for the old unfriendly URL to the new friendly one. However, this is the last step, not the first.

Details here: Changing Dynamic URLs to Static URLs [webmasterworld.com], and background information in the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim

thecleaner

10:43 pm on Jun 26, 2007 (gmt 0)

10+ Year Member



so basically just dont link to it and it wont get indexed? What if someone else links to it? How can I make these links and them not get indexed?

thanks again

jdMorgan

11:36 pm on Jun 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you trying to create and use search-engine-friendly URLs, do you want to get rid of a single dynamic URL, or what is your goal?

Jim

thecleaner

11:45 pm on Jun 26, 2007 (gmt 0)

10+ Year Member



I want to show static urls for a search query but I dont want them to get indexed as dup content.

thanks

jdMorgan

11:59 pm on Jun 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In that case, you'll need to publish those static search URLs on your pages, then rewrite them internally so that your search script will still work. Take a look at the thread I cited above for a description of the whole process and how it works.

Jim

thecleaner

12:09 am on Jun 27, 2007 (gmt 0)

10+ Year Member



Thanks Jim. I am passing your instructions to my web designer. I am only an amature and know very little about coding. I have never wrote a single code in my life.

Once my web designer is done, is there a simple way I can check and make sure he has done this correctly?

What would I look for? Can I simply look for something in the source code?

thanks again

jdMorgan

3:27 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> Once my web designer is done, is there a simple way I can check and make sure he has done this correctly?

That part is easy. Three checks:

1) You see only static URLs when hovering over any/all links on your pages.
2) Your Web site still works.
3) If you type an old dynamic link into your browser, the server redirects it to the corresponding new static link, and the browser address bar updates to show the static link.

Each of these checks is related to a step in the implementation described in the thread I cited above.

Jim

thecleaner

3:40 am on Jun 27, 2007 (gmt 0)

10+ Year Member



Thanks a lot. I was reading another thread you made about this. You went in to detail about 301 redirect.

[webmasterworld.com...]

I guess my main concern is that these urls dont get indexed or seen as duplicate content.

But from what I have read in the instructions you give with your post located at the above link, this shouldn't be a problem as long as he does the 301 redirect?

Is this something I can check on as well?

thecleaner

1:33 am on Jun 28, 2007 (gmt 0)

10+ Year Member



hello? Maybe I didnt ask that right.

jdMorgan

2:41 am on Jun 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello! This isn't instant messaging, and I'm a volunteer like all the mods/admins here; I check in (only) several times a day... :)

Use the "Live HTTP Headers" extension for Firefox and Mozilla browsers to view the headers returned by your server in real-time. If you request a URL that should be redirected, and see anything other than a 301-Moved Permanently status response, then there's a problem. This extension is available free from mozilla.org.

Jim