Questions tagged as 'htaccess'

3
answers

How can I simplify URLs for a website?

To access a particular area of the site, I have to indicate one to three parameters in the URL: Normal URL: # aceder a um módulo http://www.meusite.com/index.php?mod=john # aceder a um sub-módulo: http://www.meusite.com/index.php?mod=joh...
asked by 28.12.2013 / 10:37
2
answers

URL friendly, how to work with HTACCESS

I have created some rules in my .htaccess file to format the URL view, but I am having difficulty passing the parameter to the page that shows the products and show formatted, the code looks like this: RewriteEngine On RewriteRule ^P...
asked by 11.03.2015 / 21:19
1
answer

You can use if-modified-since with "304 not modified" without PHP

Based on this solution used in this answer on SO-en I created a .htaccess and PHP script .htaccess: RewriteEngine On RewriteCond %{HTTP:if-modified-since} . RewriteCond %{HTTP:if-none-match} . RewriteRule . not_modified.php [L] not_mo...
asked by 16.12.2014 / 17:49
2
answers

How to reference the current board

As an example, making use of the variable SCRIPT_FILENAME we can get the requested file , but for this problem what is wanted is to get the directory where the file .htaccess is located: # Rewrite the url <IfModule mod_rewri...
asked by 03.12.2014 / 21:22
3
answers

Set custom 403 error page

I have the following excerpt in my file .htaccess : <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?route=$1 [L] <...
asked by 17.01.2014 / 07:11
2
answers

How to do a http redirect to https

Well there must already be a question very similar to this in stackoverflow. But before marking as a duplicate, I have an expecification that I did not find any "equal" question that I'm going to do. Well I intend it is as follows: I ha...
asked by 23.07.2016 / 06:28
1
answer

Enable .htaccess on ubuntu

I'm using the ubuntu system on my PC and my apache does not seem to recognize htaccess, none since I created a .htaccess for my project only it does not interpret what's in the content. The content is as follows: .htaccess RewriteEngine O...
asked by 24.08.2014 / 01:57
1
answer

Friendly URL using HTACCESS

I have the following link: dominio.com/?p=filmes_v&m=tt081692 My .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^film/?$ index.php?p=filmes [NC,L] RewriteRule ^film/([a-z0-9-]+)/?$ index.php?p=fi...
asked by 21.07.2015 / 21:33
1
answer

Rewrite URL for root access but not block access to sub-domains

I have the following code that rewrites the URL you entered to correctly identify the areas, sub-areas, and content ID that the visitor is trying to access: # Rewrite the url <IfModule mod_rewrite.c> RewriteEngine On # Redirect whe...
asked by 25.01.2014 / 19:14
2
answers

Deny / hide access to files that start with dot, such as .git, .svn, .DS_Store, .yml

By default Apache denies access to files whose name begins with .ht , such as .htaccess : <Files ~ "^\.ht"> Require all denied </Files> But I notice that many files use the prefix . , like .gitignore...
asked by 03.05.2017 / 17:54