Como crear una Redirección 301

Redirección 301 con ASP Clásico <%@ Language=VBScript %> <% Response.Status=»301 Moved Permanently» Response.AddHeader «Location»,»http://www.new-url.com/» %> Redirección 301 con ASP .NET <script runat=»server»> private void Page_Load(object sender, System.EventArgs e) { Response.Status = «301 Moved Permanently»; Response.AddHeader(«Location»,»http://www.new-url.com»); } </script> Redirección 301 con JSP (Java) <% response.setStatus(301); response.setHeader( «Location», «http://www.new-url.com/» ); response.setHeader( «Connection»,…

Continuar leyendo

Seguridad para Apache mediante HTACCESS

Del mismo modo debes tener en cuenta que algunas de estas recomendaciones pueden disminuir el rendimiento de tu servidor dependiendo de tu configuración y de las especificaciones del sistema. Primero, cerciorate de tener instalado los últimos parches de seguridad No tiene sentido poner una cerradura mas resistente a tu puerta…

Continuar leyendo

Duplicate content fix index.html vs / (slash only)

This similar to the www vs non-www version of your site work-around. As you might now you, by default you can access your site as http://www.domain.com/ and http://www.domain.com/index.html with some setups it can be index.php or index.asp or default.aps, etc. Unfortunately, this creates a risk of duplicate content from the…

Continuar leyendo

Force www vs non-www to avoid duplicate content on Google

Recently, it has been talked a lot about Google and duplicate content as well as Google Canonical problems.That is, when you have your site accessible both under your_domain.com and www.your_domain.com. To avoid such problems you can use the following lines in your .htaccess file to force only the www version…

Continuar leyendo

HTTP Authentication with PHP running as CGI/SuExec

Here it is a tricky one. PHP is a feature-rich programming language and they even have a simple HTTP Auhtentication included. The bad news is that this type of Authorization does not work when your PHP is installed and working as CGI. It works perfectly when PHP is installed as…

Continuar leyendo

Change PHP variables using .htaccess

If you need to change the way your PHP is working you can do that using .htaccess. Please, note that not all PHP options can be changed using .htaccess. A list of options that can be changed using .htaccess file can be found at: http://www.php.net/manual/en/ini.php#ini.list The ones that can be…

Continuar leyendo

How to add Mime-Types using .htaccess

In case your web hosting account is not configured to server certain mime types with the proper content type. You can change this using .htaccess file. For example if you need to configure your server to display ASX files: AddType video/x-ms-asf asf asx For windows media audio WMA AddType audio/x-ms-wma…

Continuar leyendo

Introduction to mod_rewrite and some basic examples

ModRewrite is a powerful feature of the Apache web server. It provides an easy way to modify/manipulate URLs. As complicated as it sounds a regular webmaster can benefit from this feature in many way. I will list here the ones I consider most useful for the regular webmaster. Create easy…

Continuar leyendo

Change default directory page

Most probably you have been wondering how the Webserver decides which page from your site to use as a main/default page of your site. There is a directive named DirectoryIndex which takes care of this. On most web servers there is a pre-defined set of file names which server a…

Continuar leyendo