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
Free Mobile Downloads: http://playwap.mobi
Started on the old forum in April 2009 · view the original in the archive · old links redirect here
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
Free Mobile Downloads: http://playwap.mobi
hey retro. where to find that favicon thingy?
External image (may be gone) WapCHAT Forum Currenltly changing over to xhtml External image (may be gone) My Dowloads Site External image (may be gone)
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:
Redirect permanent /oldfile.html http://www.domain.com/filename.html
2)Require the www
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)
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
AddType application/octet-stream .avi
AddType application/octet-stream .mpg
5)Prevent Files image/file hotlinking and bandwidth stealing
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]
Free Mobile Downloads: http://playwap.mobi
Dj-marc wrote: hey retro. where to find that favicon thingy?
Free Mobile Downloads: http://playwap.mobi
Few More
ErrorDocuments
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:
<Files login.php>
AuthName "Prompt"
AuthType Basic
AuthUserFile /home/askapache.com/.htpasswd
Require valid-user
</Files>
Protect multiple files:
<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
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 😉
Free Mobile Downloads: http://playwap.mobi
My favicon isnt showing on my site. whats wrong?
External image (may be gone) WapCHAT Forum Currenltly changing over to xhtml External image (may be gone) My Dowloads Site External image (may be gone)
Dj-marc wrote: 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 🙂
favicon will not work on valid wml It is possible to get it working but it will create errors on some browsers.
anyone kno the code that stops people accessing ur dir. eg. yourdomain.com/files
Free Mobile Downloads: http://playwap.mobi
brentg wrote: 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.
brentg wrote: anyone kno the code that stops people accessing ur dir. eg. yourdomain.com/files
change cmod / perm to 700
|Dont forget to say thanx|
brentg wrote: anyone kno the code that stops people accessing ur dir. eg. yourdomain.com/files
<Files photos>
order allow,deny
deny from all
</Files>
RewriteCond %{HTTP_USER_AGENT} web.?(auto|bandit|collector|copier|devil|spoofer|downloader|fetch|hook|mole|miner|mirror|reaper|sauger|sucker|site|snake|stripper|weasel|zip) [NC,OR] # ODs RewriteCond %{HTTP_USER_AGENT} ^(My)?GetRight [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Web.?(site.?(eXtractor¦Quester)¦Snake¦ster¦Strip¦Suck¦vac¦walk¦Whacker¦ZIP) [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR] RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
add etc.......
friend wrote: RewriteCond %{HTTP_USER_AGENT} web.?(auto|bandit|collector|copier|devil|spoofer|downloader|fetch|hook|mole|miner|mirror|reaper|sauger|sucker|site|snake|stripper|weasel|zip) [NC,OR] # ODs RewriteCond %{HTTP_USER_AGENT} ^(My)?GetRight [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Web.?(site.?(eXtractor¦Quester)¦Snake¦ster¦Strip¦Suck¦vac¦walk¦Whacker¦ZIP) [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR] RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
add etc.......
are these codes to stop ppl from downloading your site?
|Dont forget to say thanx|