Skip to content

tu7uh.net Network Blog - Tutorial, Development, Discussion, IRC, Music, Video

Home Sitemap About Me
You are here: Home arrow Blog arrow Development arrow Pointing public html to sub-folder using htaccess
Pointing public html to sub-folder using htaccess E-mail
Written by Jimmy   
Sunday, 15 July 2007

Last few day I've been struggle regarding how to pointing public html to sub-folder. At first of development I've thinking to use subdomain as my solution. Nah! It won't work much. I do some search on google for "tu7uh" and the result doesn't satisfy me. Read more here to learn how to Pointing public html to sub-folder using htaccess.

What is the point of doing this?

The reason is RANKING! That all I want for my website and I think so do you. Don't you want your blog is worth more then 1000USD? I do! Is not that all, once you using your domainame.com instead of sub.domainname.com or domainname.com/folder/ see how your web ranking increase. I also do some research how can xxx-team.org is better then mine. I've come with 2 conclusion:-

01xxx-team.org is dedicate server and tu7uh network was only web hosting

02xxx-team.org have a better crawler because I didn't add for Google Sitemap which mean Google Sitemap Sucks!

How do I pointing public html to sub-folder using htaccess?

First of all I wanna thanks crispnetworks owner for helping me out

01First you have to make sure your apache have module for mod_write.c If not this method is won't work for you.

02Alright now open your .htaccess which is locate at the public_html folder and copy paste this code below into your .htacess

# Do not change this line.

RewriteEngine on

# Change yourdomain.com to be your main domain.

RewriteCond %{HTTP_HOST} ^(www.)?mydomain.net$

# Change 'subfolder' to be the folder you will use for your main domain.

RewriteCond %{REQUEST_URI} !^/myfilefree/

# Don't change this line.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Change 'subfolder' to be the folder you will use for your main domain.

RewriteRule ^(.*)$ /myfilefree/$1

# Change yourdomain.com to be your main domain again.
# Change 'subfolder' to be the folder you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.

RewriteCond %{HTTP_HOST} ^(www.)?mydomain.net$
RewriteRule ^(/)?$ myfilefree/index.php [L]

03Save the files.

Note: Please change the mydomain.net to your domain name and also change myfilefree to your subfolder you want it to be point as you default folder.

That all from me! I hope it useful. Tell me what you think about this :) Did your blog traffic increase? Comment me :)

Comments (0)Add Comment

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley

security code
Write the displayed characters


busy
 
< Prev   Next >

Syndicate

Comment

Web - How to use gra...
;D test
Web - How to use gra...
Testing fsdmfdsds
Web - How to use gra...
This is a test
Web - How to use gra...
cverwcvwe
IRC - Channel protec...
huh semua otai2 kat dalam nie :P
5 New Nokia Model
I love so it
Web - How to use gra...
check12sadfasdfasdfas

[+]
  • Narrow screen resolution
  • Wide screen resolution
  • Auto width resolution
  • Increase font size
  • Decrease font size
  • Default font size