Forum Moderators: phranque

Message Too Old, No Replies

redirection of indexed dynamic urls to static urls - will SE penalize it?

         

gagankkharbanda

12:52 pm on May 19, 2012 (gmt 0)

10+ Year Member



hi,

I have a site running from almost 3 years with over 500 pages (same design but different content) dynamically made and all pages are indexed in google.

Now, i have made all pages statically (means the structure of the page, content will still fetch from db) but a static URL and planning to redirect all old dynamic url's to new static url's but now i fear if SE's will consider it as spamming as old dynamic url's are already indexed and new static pages will have same content.

What should i do to that SE's will consider this as same page and ill not loose by back-links.

Please suggest!

CoursesWeb

3:58 pm on May 19, 2012 (gmt 0)

10+ Year Member



Hi
You can make 301 redierects from old URLs to new URLs.
You can find on the net about 301 redirect.

g1smd

5:17 pm on May 19, 2012 (gmt 0)

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



As soon as you redirect, the old page no longer exists and there's no duplicate.

You should redirect from old to new URL. Make sure that all old URLs, whether www or non-www, redirect to the new URL in a single hop.

You must avoid introducung a redirection chain.

gagankkharbanda

4:48 am on May 21, 2012 (gmt 0)

10+ Year Member



Hi,

Thanks for your response....

Pls suggest, which way of redirect should i choose?

1. through .htaccess file
2. redirect through scripting in page
3. redirect by control panel.

Pls guide.

CoursesWeb

11:15 am on May 21, 2012 (gmt 0)

10+ Year Member



Hi,
Personal, I use redirect 301 from .htaccess.
This is also the way recomended by google.

gagankkharbanda

12:36 pm on May 21, 2012 (gmt 0)

10+ Year Member



Hi,

I'm using to redirect in htaccess which is

Redirect 301 /gases.php?cid=1&gases=nitrogen http://www.example.com/gases/nitrogen.php

but this redirect is not working.

pls suggest

phranque

12:52 pm on May 21, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



the mod_alias Redirect directive only works on the url path.
if you need to also look at the query string you must use mod_rewrite and a combination of RewriteCond and RewriteRule directives.

one more thing - as g1smd mentioned in one of your other threads,
This is exactly the right time for you to "go extensionless".:
http://www.webmasterworld.com/apache/4448879.htm [webmasterworld.com]

therefore, i would suggest you redirect to http://www.example.com/gases/nitrogen (with no .php)

gagankkharbanda

1:01 pm on May 21, 2012 (gmt 0)

10+ Year Member



Hello Phranque,

Thanks for your prompt response and telling me to go without extension.

But, i have very little knowledge about using all this scripts.

Will you please send me the scripting code for same which ill directly upload on my .htaccess file.

Thanks in advance.

Gagan

lucy24

4:28 pm on May 21, 2012 (gmt 0)

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



Will you please send me the scripting code for same which ill directly upload on my .htaccess file.

Nope, you're in the wrong Forum. Here we make you do it yourself so you learn how.

There are two chunks of boilerplate that get posted periodically (by me, because I wrote them). One's about query strings and the other is about the redirect-to-rewrite two-step. Between the two of them you should get the general idea. And then you just have to write your specific code. That's the easy part.

gagankkharbanda

5:15 am on May 23, 2012 (gmt 0)

10+ Year Member



Hi and thanks Lucy...

finally with your help and information from boilerplate I'm able to write my code.

Finally, the code I'm using is:

RewriteCond %{QUERY_STRING} ^cid=9&gases=nitrogen$
RewriteRule ^purity\.php$ http://example.com/gases/nitrogen.php? [R=301,L]

but, im not able to go EXTENSIONLESS.

pls let me know how to do that.

g1smd

7:28 am on May 23, 2012 (gmt 0)

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



Redirect to URL without .php in htaccess when URL with parameters is requested.

Link to URL without .php from the page of your site.

Set up an internal rewrite to map extensionless URL requests to the internal path and file that will serve the content.

gagankkharbanda

8:34 am on May 23, 2012 (gmt 0)

10+ Year Member



Hi,

This is really out of syllabus for me brother...pls help me out here