Questions tagged as 'htaccess'

1
answer

Change the url to a friendly url

I'm having trouble changing the URL of the site I'm putting together, I've searched a lot of places and everyone is talking about using the .htaccess file. So far so good but I do the same as I researched and does not work. Follow the files I...
asked by 01.04.2017 / 20:05
1
answer

Friendly URL does not allow access to site index

Hello, I have the following code in htaccess RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule (.*) index.php [QSA,L] But when I try to access the main page site.com it says i...
asked by 22.03.2017 / 19:22
0
answers

Block direct file access

I need to block direct access to files in a directory, for example public_html / repository. In this folder (repository) contains images (jpg), pdfs etc. I do not want someone to directly access this folder (listing its contents) or directly ac...
asked by 30.03.2017 / 21:31
1
answer

Friendly URL does not work the way I need it

I have the following htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^imprensa/?$ imprensa.php [NC,L] RewriteRule ^imprensa/([a-z0-9\-]+)/?$ ler-impresso.php?p=$1 [NC] </IfModule> What you would have to do i...
asked by 12.04.2017 / 20:49
2
answers

Restrict .htacess rules to only one folder

I need to optimize a page that is inside a / site folder and would like to enable cookies, but they can not be enabled for the other folders. How can I make a condition or rule that limits only this folder? Code ExpiresActive On Expire...
asked by 17.03.2017 / 18:37
0
answers

Error when trying to redirect by .htaccess in a subfolder in Laravel 5.2

I'm using my application in Laravel 5.2 in a subfolder wwww.domain.com/application/ But I do not want "/ public /" to stay ahead, I'm using this way in .htaccess <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_...
asked by 21.02.2017 / 16:58
1
answer

Rehrite module in .htaccess [sort by folder]

I have two folders, when I add the function it takes only the first one, for example: RewriteRule ^atacado/(.*)/(.*) atacado/index.php?estado=$1&cidade=$2 [NC,L] RewriteRule ^mercado/(.*)/(.*) mercado/index.php?estado=$1&cidade=$2 [NC,...
asked by 26.01.2017 / 14:57
1
answer

restrict access htaccess

I have the following folder structure: Iwouldlikeanyexternaldirectaccessmadetofilesinthehelperandusefuldirectoriestobeforwardedtotheindex.htmlfilethatisintherootofthesite.Thatis,Iwanttheonlypagethatcanbeaccesseddirectly(byanapponasmartphone)...
asked by 21.01.2017 / 19:12
0
answers

Codeigniter by adding ".html" after controller name

I do not know why when I try to make a ajax call to the url " link " I get a 404 error saying the following " The url link "was not found on the server (404). I can not find where the ".html" that he is adding after the controller name comes f...
asked by 25.01.2017 / 00:19
0
answers

aptas do prestashop stopped authenticating

After a migration from the server my api has stopped passing the user on the variable $_SERVER['PHP_AUTH_USER'] follows my htaccess and script. # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outsi...
asked by 10.12.2016 / 22:34