.htaccess

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    .htaccess

    Hi

    Is there any code i can insert into .htaccess so that i can put a small logo on all my pages instead of doing it manually on every page. Coding Talk has the small green ball.

    Thanks

    #2
    Its called a favicon. download a favicon, then upload it in your web root (usually public_html, wwwroot) and it will appear like the green globe on every page.

    Comment


      #3
      thanks it worked

      Comment


        #4
        hey retro. where to find that favicon thingy?

        WapCHAT Forum Currenltly changing over to xhtml

        My Dowloads Site

        Comment


          #5
          Thought i will post a few .htaccess codes.

          1)You have just finished a major overhaul on your site, which unfortunately meant you have renamed many pages that have already been indexed by search engines, and quite possibly linked to or bookmarked by users. You could use a redirect meta tag in the head of the old pages to bring users to the new ones, but some search engines may not follow the redirect and others frown upon it.

          .htaccess leaps to the rescue!

          Enter this line in your .htaccess file:

          PHP Code:
          Redirect permanent /oldfile.html http://www.domain.com/filename.html 
          2)Require the www

          PHP Code:
          Options +FollowSymLinks
          RewriteEngine On
          RewriteBase 
          /
          RewriteCond %{REQUEST_URI} !^/robots\.txt$
          RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
          RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] 
          3)Redirect everyone to different site except 1 IP address (useful for web-development)

          PHP Code:
          ErrorDocument 403 http://www.someothersite.com
          Order deny,allow
          Deny from all
          Allow from 24.33.65.6 
          4)Force Files to download, not be displayed in browser

          PHP Code:
          AddType application/octet-stream .avi 
          AddType application
          /octet-stream .mpg 
          5)Prevent Files image/file hotlinking and bandwidth stealing

          PHP Code:
          Options +FollowSymLinks
          RewriteEngine On
          RewriteBase 
          /
          RewriteCond %{HTTP_REFERER} !^$
          RewriteCond %{HTTP_REFERER} !^http://(www\.)?askapache.com/.*$ [NC]
          RewriteRule \.(gif|jpg|swf|flv|png)$ http://www.askapache.com/feed.gif [R=302,L] 

          Comment


            #6
            Originally posted by Dj-marc View Post
            hey retro. where to find that favicon thingy?

            Comment


              #7
              Few More

              ErrorDocuments


              PHP Code:
              ErrorDocument 404 /favicon.ico
              ErrorDocument 403 https
              ://secure.htaccesselite.com
              ErrorDocument 404 /cgi-bin/error.php
              ErrorDocument 400 
              /cgi-bin/error.php
              ErrorDocument 401 
              /cgi-bin/error.php
              ErrorDocument 403 
              /cgi-bin/error.php
              ErrorDocument 405 
              /cgi-bin/error.php
              ErrorDocument 406 
              /cgi-bin/error.php
              ErrorDocument 409 
              /cgi-bin/error.php
              ErrorDocument 413 
              /cgi-bin/error.php
              ErrorDocument 414 
              /cgi-bin/error.php
              ErrorDocument 500 
              /cgi-bin/error.php
              ErrorDocument 501 
              /cgi-bin/error.php 
              Require password for 1 file:

              PHP Code:
              <Files login.php>
                 
              AuthName "Prompt"
                 
              AuthType Basic
                 AuthUserFile 
              /home/askapache.com/.htpasswd
                 
              Require valid-user
              </Files
              Protect multiple files:

              PHP Code:
              <FilesMatch "^(exec|env|doit|phpinfo|w)\.*$">
                 
              AuthName "Development"
                 
              AuthUserFile /.htpasswd
                 AuthType basic
                 
              Require valid-user
              </FilesMatch
              block access to files during certain hours of the day

              PHP Code:
              Options +FollowSymLinks
              RewriteEngine On
              RewriteBase 
              /
              # If the hour is 16 (4 PM) Then deny all access
              RewriteCond %{TIME_HOUR} ^16$
              RewriteRule ^.*$ - [F,L
              I Have not tested these so if they dont work let me know
              ;)

              Comment


                #8
                My favicon isnt showing on my site. whats wrong?

                WapCHAT Forum Currenltly changing over to xhtml

                My Dowloads Site

                Comment


                  #9
                  try clearing ur cache

                  Comment


                    #10
                    Originally posted by Dj-marc View Post
                    My favicon isnt showing on my site. whats wrong?
                    favicon.ico will not show on wml unless you use favicon code but it also invalidates your wml and some people will not be able to view that page. so its best not to

                    Comment


                      #11
                      favicon will not work on valid wml
                      It is possible to get it working but it will create errors on some browsers.

                      Comment


                        #12
                        anyone kno the code that stops people accessing ur dir. eg. yourdomain.com/files

                        Comment


                          #13
                          Originally posted by brentg View Post
                          anyone kno the code that stops people accessing ur dir. eg. yourdomain.com/files
                          i also got that prob. however, theyve told me bout htaccess code, resulting to 403/4/1 error. it'll disable for files to be listed. but my prob was , i myself cant download the file, also 403 or forbidden error. lol, even i put "allow from localhost" it doesnt work.

                          Comment


                            #14
                            Code:
                            Options All -Indexes
                            or

                            Code:
                            <Files>
                             order allow,deny
                             deny from all
                            </Files>
                            If u think on some image folder, put the index.php page with

                            Code:
                            <?php
                            header("Location: ../"); exit();
                            ?>
                            Last edited by arnage; 08.05.09, 10:52. Reason: add info
                            <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

                            Comment


                              #15
                              Originally posted by brentg View Post
                              anyone kno the code that stops people accessing ur dir. eg. yourdomain.com/files
                              change cmod / perm to 700
                              sigpic

                              |~~Dont forget to say thanx~~|

                              Comment

                              Working...
                              X