Website
Graphic
Image
Video
Music
Font
Home     Design     Download     Forums     Say Hi     Contact     Shopping Sign in | Sign up Now     Ohsik.com 2009.
Ohsik.com Portfolio
About Ohsik.com
Web Design
Graphic Design
Marketing Service
 

 
Article
Subject : SEO purpose - MOD rewrite sample code Writer : Ohsik  (ohsik@ohsik.com)

#godaddy hosting setup..
Options +FollowSymLinks -MultiViews

rewriteEngine on

#If someone type url without WWW it goes to www.domain.com automatically.
RewriteCond %{HTTP_HOST} ^ohsik\.com$
RewriteRule (.*) http://www.ohsik.com/$1 [R=301,L]

#slash remover..
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

#simple redirect (www.ohsik.com/contact.php changes to www.ohsik.com/contact/)
rewriteRule ^contact/$ contact.php
rewriteRule ^contact$ contact.php

#www.ohsik.com/board/list.php?ohsik=STH to www.ohsik.com/STH

RewriteRule ^([a-zA-Z0-9_-]+)$ board/list.php?ohsik=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ board/list.php?ohsik=$1

 
Name Comment Time
Ohsik Those code above locate be in .htaccess file in your server at top root. Jul/22/09

Add Your Comment
Name :

*Please Sign in to add your comments

[list] [Reply]

SiteMap | Email to Ohsik.com | Ask sth to Ohsik
Ohsik.com 2009. Your Imagination Can Come True.