SEO 1 Links

  SEO Blog
  SEO Forum

  Active Topics
  Register
  Memberlist
  FAQ
  Search




SEO Forums

  SEO Forum
  SEM Forum

  Directories
  Link Networks
  Mod Rewrite
  Content
  Revenue Networks

  Marketing
  Social Bookmarking
  Webmastering

  Google
  Yahoo
  MSN

  Search
  Engines

  Link Exchange



Welcome

Time Now:
Wed Nov 22, 2017 12:06 pm

All times are GMT

Log in

Username:

Password:

 





 





Who is Online



Most users ever online in a day was 2917 on Thu Oct 25, 2007 4:43 pm
 



Member Websites

Free Sitewide Links
For Top Members





SEO 1 Forums > Mod Rewrite >

Mod Rewrite Redirects



Author Thread
Andrew
Senior Member


Joined: 21 Feb 2005
Good Posts: 997
Location: apache/domlogs
Mod Rewrite Redirects  Reply with quote  

Some really neat mod rewrite tricks found in a great post by "seomike" of Search Engine Watch.

These are so useful, I just had to reference them...

code:

# To do automatic 301 redirect from old static page:

# www.somesite.com/catalog.php?cat=widgets&product_id=1234

# to new page:

# www.somesite.com/catalog/widgets-1234.html

#start .htaccess code
RewriteEngine On
RewriteBase /

RewriteCond %{QUERY_STRING} ^cat\=([^&]+)\&product_id\=([^&]+)$
RewriteRule ^$ /catalog/%1-%2.html [R=301,L]





The post SEW also shows how to redirect when you've changed the spelling of a page, and how to normalize ending backslashes when Yahoo messes with your URLs too much...

http://forums.searchenginewatch.com/showthread.php?t=3925
Post Sat Apr 23, 2005 2:58 pm
 View user's profile Send private message Visit poster's website
propertyexpert
New Member


Joined: 09 Aug 2011
Good Posts: 6

 Reply with quote  

Good post I will check it out [http://www.magicbricks.com/][url][/url]


Hi, I'm new to SEO 1.
Post Fri Dec 02, 2011 12:18 pm
 View user's profile Send private message Visit poster's website
sonu sing
Senior Member


Joined: 19 Jun 2010
Good Posts: 309

 Reply with quote  

Mod Rewrite is important part of SEO or web development. Many webmasters have more experiences in SEO field. But, they have knowledge about mod rewrite but don't know exact code. you have really show this.

Thanks for sharing your knowledge.


Tanisha Systems Review |
Post Wed Dec 07, 2011 10:15 am
 View user's profile Send private message Visit poster's website
pot-seo
New Member


Joined: 28 Dec 2011
Good Posts: 6

 Reply with quote  

here is a simple way of writing the mod redirect in your .htaccess file

This is to avoid the www and non www versions of your website.
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^placeontop\.com$ [NC]
RewriteRule ^(.*)$ http: //www. placeontop. com/$1 [R=301,L]

you can also redirect a page like: RedirectMatch 301 ^/anypage.html http://www.placeontop.com/index.shtml


No fake signatures - thanks
Post Fri Dec 30, 2011 10:39 am
 View user's profile Send private message Visit poster's website

Reply to topic
Jump to:  
Display posts from previous:      






SEO 1 © 2005-2015 - SEO 1 the SEO Forum