Most voted "htaccess" questions
WARNING: if this tag is appropriate, the question is probably duplicate. Do a search on the site before posting. Still, infrastructure configuration does not belong to the scope of the site. It was experimentally accepted a time, but it is no longer the case. The `.htaccess ` file is a configuration file for the Apache web server, allowing configuration settings to be made at a specific level of the directory, overriding the global settings.
Learn more…651 questions
Sort by count of
-
0
votes1
answer91
viewsblock image link to other websites
Guys I have the following folder at the root of my site: Arquivos/Fotos/goto1.jpg If I type in the browser the link co my site (www.meusite.com.br/Files/Photos/goto1.jpg) the photo opens, and…
-
0
votes1
answer40
viewsSymfony3 project is being accessed by mysite.com/web instead of mysite.com
Hello, I’m using Symfony 3 in my new project. I just uploaded it to the host. However, in order for me to navigate the project, I need to go to the URL mysite.com/web instead of the URL mysite.com.…
-
0
votes0
answers80
viewsRelease sources by domain in . htaccess
<FilesMatch "\.(ttf|otf|eot|woff|TTF)$"> <IfModule mod_headers.c> SetEnvIf Origin "http(s)?://(www\.)?(siteneme.com.br|www.sitename.com.br)$" AccessControlAllowOrigin=$0 Header add…
htaccessasked 8 years, 3 months ago Luiz Gustavo 1 -
0
votes1
answer72
viewsChange site via . htaccess
I have the following urls: www.meusite.com.br/pagina1 www.meusite.com.br/pagina1/a/b/c www.meusite.com.br/pagina1/1/2/nome-perfil I need that when accessing my site, I have a redirection in htaccess…
htaccessasked 8 years, 4 months ago Sr. André Baill 6,946 -
0
votes1
answer406
viewshow to allow access to the . htaccess file
My ". htaccess" is like this: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] RewriteCond %{HTTP_HOST} !^$ RewriteCond…
-
0
votes1
answer151
viewshtacces for Nginx
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?url=$1 Options -Indexes I need to convert that rule into htaccess for nginx…
-
0
votes1
answer925
viewsSend hidden parameters to another page without showing them in the URL
After doing a search on a form method POST. <form method="POST" action="../controller/precontBuscaProg.php"> <input type="date" name="dataini"> </form> I receive on another page…
-
0
votes1
answer59
viewsDoubt with htaccess file
Hello, everybody! I have a question regarding my HTACCESS file. I happen to have a site in two versions, common and mobile. In the folder of the mobile file, there is the file . htaccess that…
-
0
votes1
answer154
viewsRewrite module times error 500
I’m doing a project, and I recently learned about the rewriting of URL's, I did as I saw in the tutorials but sometimes when I try to access the address the browser returns erro 500, would that some…
-
0
votes0
answers220
viewsProblem with . htaccess on Amazon EC2
I am migrating a site to Amazon EC2 (Ubuntu with apache, php and mysql) and I am having problems with links routes. My file .htaccess is basically like this: RewriteEngine On Options +FollowSymLinks…
-
0
votes1
answer180
viewsChange default project directory in Zend 2
Hello folks this is my first post :D I’m new to Zend framework and I’m using Zend 2 + PHP 5.5 + Mysql + Apache I have the system on my server running through the address http://localhost and I am…
-
0
votes1
answer290
viewsProblems with friendly url in codeigniter
I have the following problem. I am working with a Codeigniter system and need to remove index.php from the url. My . htaccess is as below: RewriteEngine on RewriteCond $1…
-
0
votes1
answer62
viewsDoubt in . htacess
Guys, I do a internship at a web development company and tals and a little while ago we had a problem in redirecting the page. In the company we used for this project Php MVC (I never got to delve…
-
0
votes1
answer239
views.Htaccess redirects even without anything configured
Guys, I recently asked you a question right here at Stack (Doubt in . htacess) about a little htaccess to solve a problem I’m having in the company. After a good study and begin to understand +/-…
-
0
votes0
answers153
viewsThe Prestashop api has stopped authenticating
After a server migration, my api stopped passing the user in the variable $_SERVER['PHP_AUTH_USER'] Follow my htaccess and script: # ~~start~~ Do not remove this comment, Prestashop will keep…
-
0
votes1
answer75
viewsDo not show file in plot bar
How do I only show the folder in the address bar, e.g.: www.teste.com.br/admin Instead of showing up like this: www.teste.com.br/admin/index.php…
-
0
votes1
answer71
viewsRewrite module in . htaccess [split by folder]
Guys I have two folders, when I add the function it takes only the first, for example: RewriteRule ^atacado/(.*)/(.*) atacado/index.php?estado=$1&cidade=$2 [NC,L] RewriteRule ^mercado/(.*)/(.*)…
htaccessasked 7 years, 10 months ago Rafa Coelho 1 -
0
votes1
answer118
viewsSilex can’t find the routes
I have a Silex 2.0 application with PHP 7.0 and Apache 2.4 (on port 8080) with the following structure: silex/ | - vendor/ | - web/ | - index.php | - composer.json | - .htaccess Composer.json {…
-
0
votes1
answer808
viewshtaccess does not load CSS with second parameter
Hello. I have been breaking my head too much to try to solve a problem that should be very simple but is not working. My website is browsed as follows on htaccess…
htaccessasked 7 years, 10 months ago Conrado Saud 107 -
0
votes1
answer67
viewsrestrict htaccess access
i have the following folder structure: I would like any external direct access done in helper and useful directory files to be forwarded to the index.html file that is at the root of the site. That…
-
0
votes1
answer553
viewsRemove php file extension, less than one folder
I have the file. htaccess and want to take the file extensions less than the following: index.php and the system/functions/ folder which is the pas where my processing is RewriteEngine on…
-
0
votes2
answers56
viewsProblem . htaccess for www-free addressing
When I type in the browser phimodasecia.com.br my site/store enters (is redirected) with error as below: https://www.phimodasecia.com.br/https://phimodasecia.com.br/ My setting for . htaccess is #…
-
0
votes0
answers109
viewsCodeigniter by adding ". html" after controller name
I don’t know why when I try to perform an ajax call to the url "http://localhost/meusite/controller/method" I get a 404 error saying the following "The url…
php codeigniter htaccess php-5 codeigniter-2asked 7 years, 10 months ago Victor Hartur de Carvalho 182 -
0
votes0
answers45
viewsError while trying to redirect . htaccess to a sub folder in Laravel 5.2
I am using my Laravel 5.2 application in a wwww.com/application subfolder/ but I would not like "/public/" to be in the front, I am using it as follows in . htaccess <IfModule mod_rewrite.c>…
htaccessasked 7 years, 9 months ago Rodolfo Almeida 36 -
0
votes1
answer211
viewsHow to use Friendly Urls to create download link
Hello, I have the following database: ID | Chave | Nome | Tamanho =========================== 1 | q3T49 | Arq1 | 20 MB 2 | 56Q4u | Arq2 | 35 MB 3 | 7fa4b | Arq3 | 89 MB 4 | 13dqa | Arq4 | 49 MB And…
-
0
votes2
answers57
viewsRestrict . htacess rules to a single folder
I need to optimize a page that is inside a folder /website and would like to enable cookies, but they cannot be enabled for other folders. How can I make a condition or rule that limits only to that…
-
0
votes1
answer77
viewsAmigavel URL does not allow accessing the index of the site
Hello, I have the following code on htaccess RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule (.*) index.php [QSA,L] However when I try to access…
-
0
votes1
answer869
viewsIs it possible to configure the display errors in . htaccess?
In the information about my hosting service, there is a line that informs that I cannot change the php.ini, but that I can change most settings through .htaccess. I would like to enable errors…
-
0
votes0
answers323
viewsBlock direct file access
I need to block direct access to files in a directory, for example public_html/repositorio. In this folder (repository) contains images (jpg), pdfs etc. I don’t want anyone to directly access this…
-
0
votes1
answer123
viewsUser 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]…
-
0
votes2
answers129
viewsMeaning of "$" in . htaccess
I am trying to understand the file . htaccess of my server however, I do not find nice reference on the net, I have the following question: What does $ no. htaccess mean? Could someone tell me a…
htaccessasked 7 years, 7 months ago David Vinicius 3 -
0
votes1
answer149
viewsHow do I redirect a non-existent htaccess url?
I need to redirect the following link: http://dominio.com/receitas-user/ID_do_usuario/nome_do_usuario To: http://dominio.com/receitas/author/nome_do_usuario Being nome_do_usuario and ID_do_usuario…
-
0
votes1
answer356
viewsError with htaccess Sem redirect to WWW
I have the following code in my htaccess which redirects the user if they access the site without www, it works perfectly if you type in the direct domain without www it will redirect, but from…
-
0
votes1
answer122
viewshow to work with friendly url
I have a site that does not use URL friendly my URL this so http://site/download/program? id=1&cat=113&dev=1 and it passes the parameters only I want the URL to look like this…
-
0
votes0
answers21
viewsError 404 while accessing file with . htaccess
For now I’m with the following .htaccess: RewriteEngine On RewriteBase / RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME}\.php !-d RewriteRule ^index.php\/(.*)$ pages/$1.php…
-
0
votes1
answer945
viewsUser-friendly URL with HTACCESS parameters
I am passing the whole old site to url friendly and with it came several problems on the old site the url was that way http://meusite/download/programa.php? title=Avast-free-Antivirus and with the…
-
0
votes1
answer128
viewsServer blocks image
I developed a website where it doesn’t carry an image. Insert the following into the HTML code: <img src="repositorio/imagem_principal/140800039.jpg"> However, the image does not appear when…
-
0
votes0
answers53
viewsError requesting Cakephp internal pages?
I got a problem with mine CakePHP, I’m completely new to this framework and my erro is as follows: 2017-05-01 10:09:45 Error: [MissingControllerException] Controller class PagesController could not…
-
0
votes0
answers115
viewsHow to redirect GET method url with simple htaccess
Good morning, I’ve searched a lot and I’ve found several tutorials but I haven’t touched programming. I need to redirect my urls sent by GET. Ex: current url:…
-
0
votes1
answer167
viewsRewrite sending to wrong page
I have the following rewrites in my htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^dados/series/([a-z,0-9,A-Z-].+)/?$ dados-series.php?cache=$1 [NC,L]…
-
0
votes1
answer1441
viewsHide domain directory using htaccess
I need to hide the directory of url. How does it look: www.meusite.com.br/Site/view/telaInicial.php How I need: www.meusite.com.br/telaInicial.php Man .htaccess currently: RewriteEngine On…
-
0
votes1
answer161
viewsAbout the htaccess file
At the time of commissioning data from APACHE servers with PHP, what should we do about the file ".htacess"?
-
0
votes1
answer653
viewshtaccess Mobile redirection
I wanted to redirect the desktop site to the mobile site using htaccess. I already managed to do, but I wanted to pass the desktop url to the mobile url so I could junk the conversion. Ex:…
-
0
votes1
answer426
viewsChange url via . HTACCES
Sehores, good afternoon, sir. I need to change my homepage to a subfolder. I added the following code to my file .htaccess, but only worked for url without www, ex: dominio.com.br , redirects to…
-
0
votes1
answer455
viewsReplace characters from a URL via . Htaccess
I have the following model of Urls: http://dominio.com.br/cgi-bin/wiki.pl?Palavra http://dominio.com.br/cgi-bin/wiki.pl?Outra_Palavra and need to redirect to this new model:…
-
0
votes1
answer40
viewsHow to recover GET variables after it has been modified by . htaccess Rewriterule?
I have the following rule in . htaccess RewriteRule ^acesso-erro/(.*) proc_error.php?error=$1 [L] This rule retrieves the variables from the URL and puts in a "error". How can I recover this…
-
0
votes2
answers65
viewsHow to recover everything after the "?" in Rewriterule?
I have the following rule that was created by another programmer and that is running in some processes: RewriteRule ^chk-error/(.*) chk_err.php?error=$1 [L] She recovers everything that comes after…
-
0
votes1
answer278
viewsRedirect domain to a particular server folder via htaccess
I have two domains that point to my server, both to the public_html root folder. I need each domain to access a certain folder. Example: www.dominio1.com.br points to the folder /dominio_1…
-
0
votes0
answers306
views -
0
votes1
answer34
viewsSSL identification by Google
Yesterday I migrated the website to another provider and I won an SSL certificate, to which it has already been applied. I wonder if Google will automatically identify that the site is now safe…