Welcome our webmaster and SEO forum
Please enjoy the forum, contribute what you can, and wind up the Moderators!
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: .htaccess file

  1. #1
    lala is offline Senior Member
    Join Date
    Feb 2007
    Posts
    145

    Default .htaccess file

    Hi there,

    Does anyone have experience with the .htaccess file?

    Someone said that it would help Google if you enter a "last modified date" in your .htaccess file or scripts in your pages.

    I really do not have a clue what a .htaccess file is or which information including the syntax would be necessary.

    Thank you,
    lala

  2. #2
    temi's Avatar
    temi is offline Facilitator
    Join Date
    Jun 2003
    Location
    London, England.
    Posts
    10,303

    Default

    Lala,
    I do not think its a good idea or its true to modify .htaccess just to add "last modified date" if you have not modified anything in the first place. .htaccess is a hidden file (hidden from users and web browser) but you can see if you set your ftp software to view hidden file.
    I will suggest you leave it well alone unless you know what you are doing

    * Comprehensive UK Web Directory List . eCommerce software UK
    * BossCart.com can build you a.
    Register your domain names at Velnet
    ::
    Add Eco sites to The Green Directory free of charge.
    Use LBS Free PHP Directory Script . Web Hosting Blog

  3. #3
    lala is offline Senior Member
    Join Date
    Feb 2007
    Posts
    145

    Default More questions

    Temi,

    Thank you.

    What is the file for? Who would write changes to it? And in case you have updated content on the site do you then have to update the file?

    I would not mind to have at least a look on one to get an idea what this is all about. Is there a safe way just to check the entries in the file?

    lala

  4. #4
    temi's Avatar
    temi is offline Facilitator
    Join Date
    Jun 2003
    Location
    London, England.
    Posts
    10,303

    Default

    Lala,
    Yes, its a good idea to have a look. The file is used for a number of thing for example, until about 4 or 5 weeks ago, this forum was at UK Forums - Webmaster SEO & Small Business Discussions - Powered by vBulletin . Then I decided that its better on the current url. I used .httaccess file to point all traffic that are still going to the old url to come to this new url. That is just one of the several uses it can be put to. I hope others will give example of how they have used .httaccess file

    * Comprehensive UK Web Directory List . eCommerce software UK
    * BossCart.com can build you a.
    Register your domain names at Velnet
    ::
    Add Eco sites to The Green Directory free of charge.
    Use LBS Free PHP Directory Script . Web Hosting Blog

  5. #5
    lala is offline Senior Member
    Join Date
    Feb 2007
    Posts
    145

    Default Separate file

    Is there any example file that I could have a look at (including good articles, books etc)? I wondered what the file itself would loook like. Or is it included into t he HTML header?

    lala

  6. #6
    temi's Avatar
    temi is offline Facilitator
    Join Date
    Jun 2003
    Location
    London, England.
    Posts
    10,303

    Default

    Lala,
    The file is hidden (which means you cannot see it unless you instruct your browser or ftp software to reveal hiddent files as well)

    Its and ugly complicated looking file........ I have just pasted one below. Its the defaul .httaccess file that come with a directory software called eSyndicate.
    I don't think you need a book for it, just do a search on the net and you will find a lot of tutorials on .httaccess file. BTW, its a Unix/Linux file, I don't think it exist on Windows platform.
    -----------here is a .httaccess file---------------------
    # enable mod_rewrite
    RewriteEngine on

    # mod_rewrite rules for categories pages
    RewriteRule ^(.*)/$ index.php?category=$1 [QSA,L]
    RewriteRule ^(.*)/index([0-9]+).html$ index.php?category=$1&page=$2 [QSA,L]

    # mod_rewrite rule for suggest link page
    RewriteRule ^suggest-link([0-9]+).html$ suggest-link.php?id=$1 [QSA,L]

    # mod_rewrite rules for new links page
    RewriteRule ^new-links.html$ new-links.php [QSA,L]
    RewriteRule ^new-links([0-9]+).html$ new-links.php?page=$1 [QSA,L]

    # mod_rewrite rules for top links page
    RewriteRule ^top-links.html$ top-links.php [QSA,L]
    RewriteRule ^top-links([0-9]+).html$ top-links.php?page=$1 [QSA,L]

    # mod_rewrite rules for popular links page
    RewriteRule ^popular-links.html$ popular-links.php [QSA,L]
    RewriteRule ^popular-links([0-9]+).html$ popular-links.php?page=$1 [QSA,L]

    # mod_rewrite rules for editors links page
    RewriteRule ^editor-links/index.html$ editor-links.php [QSA,L]
    RewriteRule ^editor-links/index([0-9]+).html$ editor-links.php?page=$1 [QSA,L]

    # mod_rewrite rules for view link page
    RewriteRule ^(.*)/(.*)-l([0-9]+).html$ view-link.php?cat=$1&title=$2&id=$3 [QSA,L]

    # mod_rewrite rules for news page
    RewriteRule ^news.html$ news.php [QSA,L]
    RewriteRule ^(.*)-n([0-9]+).html$ news.php?title=$1&id=$2 [QSA,L]

    # mod_rewrite rules for additional pages
    RewriteRule ^p(.*).html$ page.php?name=$1 [QSA,L]

    # mod_rewrite rules for error pages
    RewriteRule ^([0-9]+).htm$ error.php?error=$1 [QSA,L]

    ErrorDocument 500 /dir/500.htm
    ErrorDocument 404 /dir/404.htm
    ErrorDocument 403 /dir/403.htm
    ErrorDocument 401 /dir/401.htm

    * Comprehensive UK Web Directory List . eCommerce software UK
    * BossCart.com can build you a.
    Register your domain names at Velnet
    ::
    Add Eco sites to The Green Directory free of charge.
    Use LBS Free PHP Directory Script . Web Hosting Blog

  7. #7
    OldWelshGuy's Avatar
    OldWelshGuy is offline Super Moderator
    Join Date
    Oct 2004
    Posts
    1,998

    Default

    The 'last modified ' notice is sent by your web server. whoever told you to add it to your htaccess is wrong. Most 99% of servers supply the last modified timestamp, but dynamic sites always give a last modified datestamp as the time the spider hits it.

    Be VERY carefull what you do with your htaccess,as you can block the robots completely from visiting the site if you get it wrong.

  8. #8
    temi's Avatar
    temi is offline Facilitator
    Join Date
    Jun 2003
    Location
    London, England.
    Posts
    10,303

    Default

    Quote Originally Posted by OldWelshGuy View Post
    Be VERY carefull what you do with your htaccess,as you can block the robots completely from visiting the site if you get it wrong.
    Lala, I will go one step further and say DO NOT TOUCH your .httaccess at all unless you absolutely need and even them, ensure you have a backup of the original .httaccess file so that you can restore it if changes you made goes wrong.
    Good luck

    * Comprehensive UK Web Directory List . eCommerce software UK
    * BossCart.com can build you a.
    Register your domain names at Velnet
    ::
    Add Eco sites to The Green Directory free of charge.
    Use LBS Free PHP Directory Script . Web Hosting Blog

  9. #9
    lala is offline Senior Member
    Join Date
    Feb 2007
    Posts
    145

    Default No worries

    Thank you guys.

    Do not worry. I am just curious. I would not dare to change the file unless I know more about it (if it was true that it helps with Google I would have tried to find someone who knows what he/she is doing).


    lala

  10. #10
    OldWelshGuy's Avatar
    OldWelshGuy is offline Super Moderator
    Join Date
    Oct 2004
    Posts
    1,998

    Default

    Pm me your url and I will take a quick look at things for you. You can then rest assured as to what needs doing, (if anything)

Page 1 of 4 123 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. .htaccess file
    By lala in forum General Search Engine Discussions
    Replies: 4
    Last Post: 10-16-2007, 10:39 PM
  2. htaccess files
    By melkior_inactive in forum General Webmaster Talk
    Replies: 21
    Last Post: 05-13-2007, 09:46 AM
  3. .htaccess
    By gkd_uk in forum General Webmaster Talk
    Replies: 2
    Last Post: 05-05-2007, 03:35 PM
  4. .htaccess Files
    By ovi in forum General Webmaster Talk
    Replies: 5
    Last Post: 04-02-2007, 11:46 AM
  5. How to link a CSS file to a HTML file?
    By ForumJoiner in forum General Webmaster Talk
    Replies: 0
    Last Post: 03-26-2007, 08:22 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124