Questions tagged as 'apache'

2
answers

Date in Portuguese returning in English

I'm using this code to return the current date in Portuguese (locally): <? setlocale(LC_ALL, 'pt_BR', 'pt_BR.utf-8', 'pt_BR.utf-8', 'portuguese'); date_default_timezone_set('America/Sao_Paulo'); echo utf8_encode(strftime('%A, %d de %B de %Y...
asked by 22.10.2017 / 16:13
2
answers

How to create an exception in htaccess for locking folders

I have a folder that contains some PDFs and I would like to block access to the folder through the url (ex: www.site.com/pdf) so I got the following command deny from all however when I call PDF inside an iframe the server says I'm not al...
asked by 12.08.2017 / 04:02
1
answer

How to configure my htaccess?

I currently have a linux server in linode.com , where I have a java application running on a tomcat. From that, I'd like to make some settings in the htaccess file. My problem is that the server does not exist this file, so I create...
asked by 01.08.2017 / 20:51
1
answer

htaccess file giving forbidden

I'm wearing the Uniform S erver, which is a portable server, and is already with mod_rewrite active and even then my htaccess file returns forbidden. file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}...
asked by 24.06.2017 / 21:15
1
answer

How to rewrite the apache URL with variable and then use other variables in PHP?

Hello, I do not know if the title of the question makes much sense, but the question is: I have this code: RewriteRule ^teste/([a-z]+)$ settings/php/teste.php?lib=$1 It creates a redirect, but when I try to add variables by URL it does n...
asked by 25.07.2017 / 03:16
1
answer

Why is working slower locally?

When I upload a local server with PHP or NodeJs , I come across a slowness that does not happen in a hosting The same happens when I simulate a server with Ngrok In other words, is this all due to processing power or do...
asked by 25.07.2017 / 14:40
1
answer

.htaccess to prevent navigation

I have a Debian server and the directory for the projects in apache is the traditional / var / www / html, I'm trying to block the browsing of directories and sub-directories by browser with .htaccess but I'm not hitting. The .htaccess code i...
asked by 22.06.2017 / 19:57
1
answer

Forbidden when accessing my directories - Apache

I'm using Windows 7 x64 and I installed apache 2.4 with PHP 7.1 separately, set everything up and when I put localhost, it works normally. Then inside my htdocs, I created a folder called projects. When I access the address link it returns...
asked by 08.06.2017 / 15:37
1
answer

Create / Edit a file on the server (Apache)

With the following code I would like to create a file on the server. <?php date_default_timezone_set('America/Sao_Paulo'); $nomeArquivoLogDia = date('Ymd') . '-teste.log'; if (file_exists($nomeArquivoLogDia)) { $arquivo...
asked by 26.05.2017 / 03:53
1
answer

Doubt in .htacess

Well, I'm doing internships in a web development company and tals and soon we had a problem in redirecting the page. In the company we used for this project Php MVC (I never got to deepen in Php) and an .htacess file that I had never seen bef...
asked by 29.11.2016 / 14:26