Como muchos sabrán, me dedico a la programación de portales web y pues me he topado con un grán problema: La optimización Web.
Después de millones y millones de intentos y de “consejos” que leí por internet, me di cuenta de que uno de mis principales errores como programador es que mis páginas web se construyen [...]
I know you guzy all know about index file. This is the default file which is executed in the web server. For example, if you type”” in this the browser, the “index.php” gets loaded first. This “index.php” file is commonly know as directory index file.
Basically , the default executed file in the web directory starts [...]
أحد قرّاء رحلة ضَوْء لديه مشكلة وهي أنه لا يستطيع الوصول إلى ملف htaccess في ووردبريس. فعندما يصل إلى ملفات ومجلدات ووردبريس باستخدام برنامج FTP لا يجد هذا الملف. هذا الملف له أكثر من استخدام. يستخدم في ووردبريس لأجل تخصيص الروابط الإلكترونية للتدوينات والصفحات permalinks . لا تجد هذا الملف إلا إذا كنت قد [...]
htaccess Editor is an online generator which can easily generate .htaccess files for your websites/blogs.
If you are webmaster or blogger, i think you must knwo what is .htaccess file. There are few things that htaccess file can do:
Rewriting URLs
Authorization
Redirection
Access restriction
Deny access to file
Hotlinking protection
These are common features that a htaccess file can do. If you [...]
If you are looking for the examples of URL rewriting then this post might be useful for you. In this post, I’ve given five useful examples of URL rewriting using .htacess. If you don’t know something about url rewriting then please check my older post about url rewriting using .htaccess.
What is directory listing ?
As we know, most of the website contains “images” folder inside the root folder. If we type “www.somesite.com/images” in the browser and it shows the listing of the files in the browser like the picture below which means that directory listing is allowed on that web server.
Cansado de que me roben ancho de banda gracias al hotlinking decidi tomar cartas en el asunto. Para el que no sabe que es esto del hotlinking les doy un ejemplo practico. Yo hago un post y subo una imagen (a mi host) como para acompañar; luego viene una persona, se interesa en la imagen [...]
Cansado de que me roben ancho de banda gracias al hotlinking decidi tomar cartas en el asunto. Para el que no sabe que es esto del hotlinking les doy un ejemplo practico. Yo hago un post y subo una imagen (a mi host) como para acompañar; luego viene una persona, se interesa en la imagen [...]
I wrote about .htaccess Editor in my previous old blog. I decided to talk about it again in my new blog because I feel that it is a wonderful tool. For those that are not familiar with programming and creating .htaccess file, this is the tool just right for you.
.htaccess Editor is a simple [...]
Spesso si notano in giro siti che usano immagini altrui non caricandole sui propri server ma utilizzando e sfruttando la risorsa tramite un semplice collegamento.
Questa tecnica è chiamata HOTLINKING e, oltre a non essere eticamente corretta, provoca danni più o meno seri al sito origine dell’immagine, tramite un consumo extra di banda non richiesto ed [...]
In my last post of Hiding .php file extension with .htaccess Michael has mentioned that you can create your own custom page for the the 404(not found) error in server. And alex wanted to know that tip as well.Alex here is the post for you rather than replying your comment.
Last time I’ve written an article about hiding php file extension where I’ve showed you how you can use .html or .asp extension of file instead of .php extension. But there was one flaw in that technique you have had to change the file extension explicitly but in this post I’m going to show you [...]
A .htaccess file is a simple ASCII file similar to that created through text editor such as Notepad or Simple Text. Most people are confused with the naming convention for the file. The term .htaccess is not a file .htaccess or somepage.htaccess because it is the file extension simply named as such. Its widely known use is related to implementing custom error page or password protected
You may think that under Microsoft Windows platform, we are not able to create any file with file name that starts with dot sign (.).If you are setting up Apache Web Server on windows platform and wish to use .htaccess file to post certain authentication a.k.a security restrictions for some particular directories in the Web server, you might face the problem to create a ".htaccess" file.From my understanding, actually we have at least two ways to create a file with filename that starts with a dot under Windows platform.1) Use MS DOS command to rename an existing file with normal filename to filename starts with dot .e.g.C:\>ren htaccess .htaccess2) During the process of creating and saving a new file by using notepad, put double quote (”) at the front and end of your desired filename (of
HTACCESS Editor es un sitio web para elaborar un .htaccess de forma automática y a través de internet. Con una sencilla interfaz y al puro estilo de una web 2.0. Por el momento está disponible solo en inglés y a la espera de que alguien lo quiera traducir a otros idiomas.
Se pueden crear páginas con [...]
HttaccessEditor brinda un servicio que nos permitirá configurar los archivos .htaccess de manara Online sin necesidad de conocer su sintáxis. Les recuerdo que los archivos .httaccess son utilizados en los servidores web para definir las reglas de acceso a una página web. AsÃ, configurando apropiadamente estos archivos se puede denegar el acceso a una página web, requerir una contraseña para su acceso, establecer redirecciones, (...)
-
Internet / Sitios Web
We recently started installing suPHP on a few of our servers, which is an implementation of phpsuexec, only a ton faster and with less overhead. Yesterday I posted a tutorial on how to install suPHP on a PHP5/Apache server outside of EasyApache, but today I shall go over how to enable PHP directives in your .htaccess instead of using the php.ini.
First of all, if you’d rather use the .htaccess than the php.ini capabilities of a phpsuexec environment, then shame on you. But, we have some customers who are terrified of php.ini and would rather use the .htaccess. So what? Ok, well there is a workaround. Mr. Joye released a newer version of htscanner that now works with suPHP, and allows you to use php directives in your .htaccess just like you did when PHP was installed as and Apache module. All you have to do is download the tarball and install like any other PHP module:
wget http://pecl.php.net/get/htscanner-0.8.1.tgz
tar -xvzf htscanner-0.8.1.tgz
cd .htscanner-0.8.1
./conf
This neat little trick will force all browsers that are trying to access your website from domain.com into a standardized gateway of www.domain.com for increased search engine consistency, as well as a consistent aesthetic appearance to regular users.
Add the following snippet of code to the .htaccess of your public html directory where you would like to use this.
RewriteEngine On
RewriteCond %
Para casos como el mío, que no manejo mucho el contenido de estos ficheros, puede resultar muy útil hacer uso de herramientas como ésta, en dóndo llenando algunos combos/campos podemos lograr código funcional para nuestras necesidades.
Tal y como dicen en la fuente, las tareas soportadas son:
Denegar acceso a los ficheros.
Autentificación básica.
Páginas de error personalizadas.
Páginas por defecto a cargar (ej: index.html).
“WWW Setup” (Redireccionar peticiones de dominio.tld a www.dominio.tld).
Redirecciones 301/302.
Denegar acceso a URLs.
Redirect Old domain to New domain
Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
Please REPLACE www.newdomain.com in the above code with your actual domain name.
In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.
Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.
Redirect to www
Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com
The .htaccess file needs to be placed in the root directory of your o
As a web designer or developer, it is important to know how to use the htaccess file to your advantage. It is a very powerful tool, and can even work as a deterrent for bandwidth thieves, exploits, and hackers. Below are some common examples of rules to consider when developing websites. We hope you find [...]
read more
To create a .htaccess file, you can use any text editing sowtware to create it and then save it as “A.htaccess”. Once you have done that, go to terminal to rename it. The reason for doing this, because you cannot save any file name like this:
.htaccess
From Terminal, type:
mv A.htaccess .htaccess
.htaccess file permission
Change .htaccess file permission to 666, the command line on Terminal will be like this:
sudo chmod 666 .htaccess
enter your admin password, job done.
It should work perfectly!
The next thing is to ensure mod_rewrite is enable on Apache Server. edit httpd.conf, search for this line “AllowOverride None” and then change to
AllowOverride All
# This controls which options the .htaccess files in directories can
# override. Can also be “All”, or any combination of “Options”, “FileInfo”,
# “AuthConfig”, and “Limit”
#
AllowOverride All
If you host muti domain names on the same server, you will ne
En BaluArt han hecho una lista de ejemplos de lo que podriamos hacer con el archivo .htaccess. Para el que no tenga idea de lo que es un archivo .htaccess, es un archivo que se encuentra oculto en el servidor por medio del cual podemos especificarle directivas a la configuración del servidor Web Apache. Cuando se realiza una petición al servidor este intenta buscar el fichero .htaccess en el directorio solicitado y si existe le da prioridad a estas directivas.
1. Redireccionamiento
El redireccionamiento nos permite redirigir una petición a determinada URL. Esto es útil por ejemplo cuando estamos haciendo actualizaciones o pruebas en nuestro sitio podemos redireccionar todo el trafico entrante a determinada URL como es el caso del siguiente ejemplo:
order deny,allow
deny from all
allow from 123.123.123.12
ErrorDocument 403 /pagina.html
<Files pagina.html>
allow from all
</Files>
En la tercera linea escribimos nuestra ip que es la única que tiene acceso al sitio y los de
Creare delle pagine di errore per gli status code con Apache e htaccess è un gioco da ragazzi. Gli errori che il server riscontra vengono segnalati da pagine apposite del server con dei codici di errore detti status code che identificano numericamente il tipo di errore riscontrato.Il file .htaccess è un file di testo in formato ASCII che detta delle istruzioni al webserver Apache. Serve a stabilire delle regole che valgono per la directory (e i file) in cui è inserito e le sue sottodirectory (salvo impostare regole specifiche nelle sottodirectory).
Nice short post today, with one quick SEO tip that can (sometimes) gain you big pagerank quickly.
As previously mentioned, the search engines see http://www.newmediaist.com and http://www.newmediaist.com/index.php as two different pages (although they may lead to the same content). This means that although they are actually the exact same content, from the search engine’s perspective both / and /index.php have their own ranking criteria (also known as “link juice” - backlinks, pagerank, etc…)
Now we don’t want to split up “link juice” between two pages, so we need to either 301 redirect all requests for /index.php to /, or visa versa. This can be done by a fairly simple addition to the .htaccess file.
#Forward index.php to /
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.newmediaist.com/$1 [R=301,L]
(Reminder: Change www.newmediaist.com to your domain name!)
Recently, when I had a domain change, I needed something in order to transfer all of my traffic from the old domain to the new one. So I used .htaccess for the redirection.
You can also use this, by typing the following in your .htaccess:
RewriteEngine OnRewriteCond %{HTTP_HOST} ^.*oldwebsite.com$ [NC]
RewriteRule ^(.*)$ http://www.preferredwebsite.net/$1 [R=301,L]
Replace oldwebsite.com with the current website and replace http://www.preferredwebsite.net with the new website URL where you want to redirect the traffic to.
If you want to know what did I used for my old domain, then see below:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sizzledcore.uni.cc$ [OR]
RewriteCond %{HTTP_HOST} ^www.sizzledcore.uni.cc$
RewriteRule ^(.*)$ http://www.sizzledcore.com [R=301,L]
What is htaccess?Htaccess is server directory configuration file. With htaccess, main server configuration can be partially overridden. It is usually in root of your site, and it can be added to other directories. Can be used for redirection, password protection, or to deny access to certain IP’s.
Important info: .htaccess is a text file, use text editor (without wrapping), upload it using FTP text mode. After uploading, check is it working. If you get server error (500), something is wrong. Edit, fix and check again.
How to hide affiliate links using htaccess
Let’s say that you want to hide affiliate link or simply make shorter and better looking url.
Edit htaccess and add this line:
redirect 301 /affiliatedirectory http://YourAffiliateUrl
In above example, /affiliatedirectory could be anything, you don’t need to make directory with that name, just keep in mind, if that directory already exists, every page in that dir will be redirected to YourAffiliateUrl.
Pag
Last week I found the need to block incoming traffic from a particular site. While the author was kind enough to remove the links to my page when I first discovered the issue I was quick to block the traffic just to be safe.
The following code can be placed in your .htaccess file to block incoming traffic by URL.
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} FirstSite.com [NC,OR]
RewriteCond %{HTTP_REFERER} SecondSite.co.uk
RewriteRule .* - [F]
The code above blocks traffic from two separate URLs. [NC, OR] should follow every line after the first but excluding the last in order to block more than one site.
Website Redirection is a very phenomenal case when it comes to handling large and huge websites and blogs with broken permalinks etc
In this case we always look forward to use htaccess redirection as it is very much fast and instantaneous
Here I shall discuss some facts and tips on htaccess Redirection
Facts on htaccess [...]
Most of us have a specified limit to the amount of traffic our web servers will handle for us. That limit seems very generous – until you start looking at image downloads and the bandwidth required. A few dozen users downloading an image – that’s one thing. But what if you have an image that [...]
Spammers have a knack for developing “overrides” to even the most secured aspect of the system including those that are not readily recognized as potential targets. The .htaccess file can be used to keep e-mail harvesters away. This is considered very effective since all of these harvesters get to identify themselves in some way using [...]
At present, there is a growing nuisance for users and administrators alike of sites that ruin web servers and more particularly, blogs. This nuisance is being referred to as comment, trackback and referrer spams. Various solutions have been proposed with some being applicable to even two of these forms of spam using a single solution.
What [...]
A .htaccess file is a simple ASCII file similar to that created through text editor such as Notepad or Simple Text. Most people are confused with the naming convention for the file. The term .htaccess is not a file .htaccess or somepage.htaccess because it is the file extension simply named as such. Its widely known [...]
How often do you check your Server Error Logs?
A prudent webmaster needs to keep track of the various IP addresses belonging to — at least — the major search engines: Google, Yahoo and MSN.
You might be blocking vital search engine spiders from indexing your site and hence denying you the traffic that you deserve.
The best [...]
Okay, the titles a little inaccurate but 43 Folders posted a link to a great Wikipedia article full of .htaccess goodness.
.htaccess is a configuration file that you can drop into your website to achieve lots of cool stuff such as:
Password Protection
Hotlinking prevention
Redirects
Preventing search engines from crawling your content
Lots and lots more.
The syntax for using .htaccess is a little scary looking but with the examples on the Wikipedia page and the links given to external resources on the page you’ll be flying in no time.