{"id":1475,"date":"2017-10-23T10:22:00","date_gmt":"2017-10-23T15:22:00","guid":{"rendered":"http:\/\/linuxitos.com\/main\/ocultar-extension-en-links-php-y-html\/"},"modified":"2017-10-23T10:22:00","modified_gmt":"2017-10-23T15:22:00","slug":"ocultar-extension-en-links-php-y-html","status":"publish","type":"post","link":"https:\/\/linuxitos.com\/main\/ocultar-extension-en-links-php-y-html\/","title":{"rendered":"Ocultar extensi\u00f3n en links PHP y HTML"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/3.bp.blogspot.com\/-GzQXpvSFCxk\/We4HYSPtfTI\/AAAAAAAAEmI\/CInf_8XMsrAbCUWVVAsmZdt4DAEUsr_uACLcBGAs\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2017-10-23%2B10-13-48.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" data-original-height=\"458\" data-original-width=\"789\" src=\"https:\/\/3.bp.blogspot.com\/-GzQXpvSFCxk\/We4HYSPtfTI\/AAAAAAAAEmI\/CInf_8XMsrAbCUWVVAsmZdt4DAEUsr_uACLcBGAs\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2017-10-23%2B10-13-48.png\" \/><\/a><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">La idea principal es que en la barra de direcci\u00f3n, o en las vistas preliminares no se muestre el link directo o extensi\u00f3n de la p\u00e1gina a visitar. \u00c9sta pr\u00e1ctica es muy com\u00fan en p\u00e1ginas de noticias, deportes, etc.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Ya sea por seguridad, o por el simple hecho de poder hacerlo, se utiliza.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">El uso es relativamente simple, basta con agregar el siguiente fragmento de c\u00f3digo dentro del archivo .htaccess.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<pre style=\"background: url(&quot;assets\/shadow.png&quot;) 50% 100% repeat-x rgb(245, 245, 245); border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-shadow: rgb(204, 204, 204) 0px 0px 3px; box-sizing: border-box; font-family: &quot;Courier 10 Pitch&quot;, Courier, monospace; font-size: 1.5rem; font-stretch: normal; font-style: inherit; font-weight: inherit; line-height: 1.6; margin-bottom: 10px; max-width: 100%; outline: 0px; overflow: auto; padding: 9.5px; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; word-break: break-all; word-wrap: break-word;\"><span style=\"border: 0px; font-family: menlo, monaco, consolas, &quot;courier new&quot;, monospace; font-size: 15px; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; line-height: 18.5714px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"color: #660000;\">&lt;IfModule mod_rewrite.c&gt;<\/span><span style=\"color: #333333;\"><br \/><br \/>RewriteEngine on<br \/><br \/>RewriteCond %{REQUEST_FILENAME} !-d<br \/>RewriteCond %{REQUEST_FILENAME}.php -f<br \/>RewriteRule ^(.*)$ $1.php<br \/><br \/>RewriteCond %{REQUEST_FILENAME} !-d<br \/>RewriteCond %{REQUEST_FILENAME}.html -f<br \/>RewriteRule ^(.*)$ $1.html<br \/><br \/><\/span><span style=\"color: #660000;\">&lt;\/IfModule&gt;<\/span><\/span><\/span><\/pre>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Uso: para invocar los links desde el c\u00f3digo fuente del proyecto, es necesario tambi\u00e9n, no agregar la extensi\u00f3n al archivo, es decir, en lugar de usar index.php, \u00fanicamente ser\u00eda index<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Si, desean descargar el c\u00f3digo para probarlo, aqu\u00ed les dejo el link de github.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: center;\"><span style=\"font-size: large;\"><a href=\"https:\/\/github.com\/jesusferm\/rm_extensions_website\">https:\/\/github.com\/jesusferm\/rm_extensions_website<\/a><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Muchas gracias por visitar, espero que sea de utilidad.<\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>La idea principal es que en la barra de direcci\u00f3n, o en las vistas preliminares no se muestre el link directo o extensi\u00f3n de la p\u00e1gina a visitar. \u00c9sta pr\u00e1ctica es muy com\u00fan en p\u00e1ginas de noticias, deportes, etc. Ya sea por seguridad, o por el simple hecho de poder hacerlo, se utiliza. El uso [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[152,151],"tags":[],"class_list":["post-1475","post","type-post","status-publish","format-standard","hentry","category-html","category-ocultar-extension-en-links-php"],"_links":{"self":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/comments?post=1475"}],"version-history":[{"count":0,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1475\/revisions"}],"wp:attachment":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/media?parent=1475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/categories?post=1475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/tags?post=1475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}