Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
How do I make a simple .htaccess file?
Old 08-27-2008, 08:25 PM How do I make a simple .htaccess file?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,112
Trades: 0
I`ve never tinkered with .htaccess so I`ve no idea about the correct syntax for writing a file or what to put in it but I heard its just a simple text file.

Could someone show me how to write a file that does something simple?
I just need an example.

I`m using Dreamweaver in code view as my html text editor.

I`ve tried Googling but most of the tutorials are either too advanced or else they seem incomplete.

If somebody can recommend a good book for getting up to speed with all of the .htaccess tricks that would be excellent too.

cheers!
TWD is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-28-2008, 05:39 AM Re: How do I make a simple .htaccess file?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
something simple:
Code:
DirectoryIndex home.php index.php
sets the site (or folder) to use either home.php OR index.php as the index page.

The Apache site is the best to work through. All "tutorials" will seem incomplete because there is no such thing as a complete .htaccess file. It comprises of many sections and each one is an independent entity, so a tutorial on some sections can be pretty comprehensive, but as a whole? Not a chance , the mod_rewrite section could take up a whole book.

HighRankings Redirect forum has lots and lots and lots of examples complete with code
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-28-2008, 05:54 AM Re: How do I make a simple .htaccess file?
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
http://httpd.apache.org/docs/
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 08-31-2008, 05:02 AM Re: How do I make a simple .htaccess file?
Novice Talker

Posts: 9
Trades: 0
Here is an easy an useful example for setting up the canonical url:
Code:
RewriteEngine On 
Options +FollowSymlinks
RewriteCond %{http_host} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,NC]
__________________

Please login or register to view this content. Registration is FREE
propress is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How do I make a simple .htaccess file?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28923 seconds with 12 queries