Results 1 to 6 of 6
  1. #1

    How to protect a html / css?

    Hello,
    Usually, I develop my sites with joomla and so I use htacess comes with joomla and also some plug-ins to enhance the security of the site.
    I completely remade my website in html / css and then put it online, I like to have your opinion advice on how to protect a site and also on the contents of htacess.
    Any help is welcome.
    Thanks
    Yahia

  2. #2
    Join Date
    Feb 2003
    Location
    Cumbernauld, Scotland, UK
    Posts
    734
    Protect it from what?
    If you overprotect the code, then noone will be able to view it!
    M8 INTERNET : Simple and cost effective website hosting from the UK
    M8 INTERNET : Google Ads Account Management

  3. #3
    Join Date
    Oct 2002
    Location
    State of Disbelief
    Posts
    22,951
    Quote Originally Posted by copernic2006 View Post
    I like to have your opinion advice on how to protect a site
    In order to display it in a browser it would need to be readable, either directly or after decrypting (if encrypted). Pointless, really, as it can't be "protected", only obfuscated.
    Having problems, or maybe questions about WHT? Head over to the help desk!

  4. #4
    Thank you for taking the time to answer the question may seem simplistic, even silly, but not for the novice I am .
    What I wanted to have are recommendations for example putting an empty file index in the css files and images to hide the file tree.
    A feedback on the content of the file htacess help me enormously (as quoted in my first post, I rely on reflex and a user of joomla possible that this approach is not to do).
    Thank you.

  5. #5
    Join Date
    Oct 2002
    Location
    State of Disbelief
    Posts
    22,951
    Oh, I misunderstood. I thought you were trying to hide the code that makes up an HTML page.

    If you're able to use .htaccess, you can simply put:
    Options -Indexes

    If that's in the site's root folder, it covers them all.
    Having problems, or maybe questions about WHT? Head over to the help desk!

  6. #6
    English is not my own language , I use google translate, this could mislead you.
    Thank you for your tip, I'd like to hear your opinion on the following content (htacess):
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    RewriteRule ^(.*)$ index.php [F,L]
    Options All -Indexes
    and finally to improve site performance:
    #cache html and htm files for one day
    <FilesMatch ".(html|htm)$">
    Header set Cache-Control "max-age=43200"
    </FilesMatch>

    #cache css, javascript and text files for one week
    <FilesMatch ".(js|css|txt)$">
    Header set Cache-Control "max-age=604800"
    </FilesMatch>

    #cache flash and images for one month
    <FilesMatch ".(flv|swf|ico|gif|jpg|jpeg|png)$">
    Header set Cache-Control "max-age=2592000"
    </FilesMatch>

    #disable cache for script files
    <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
    Header unset Cache-Control
    </FilesMatch>
    Just for information, this is the search results on google (I have no knowledge about the command used in the file htacess).
    Thank you very much for your help.
    Yahia

Similar Threads

  1. Convert HTML Table header into CSS/HTML
    By HS Nick in forum Design Requests
    Replies: 3
    Last Post: 07-04-2009, 03:39 PM
  2. Looking for CSS person to convert only html table to CSS
    By lexington in forum Design Requests
    Replies: 3
    Last Post: 09-16-2008, 06:04 PM
  3. Replies: 5
    Last Post: 06-08-2008, 03:51 PM
  4. Replies: 5
    Last Post: 07-09-2005, 03:12 AM

Posting Permissions

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