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
-
1
votes1
answer63
viewsSettings . htacess - Dynamic Error Page
I wonder if it is possible to generate a dynamic error page from parameters passed to an html page and get these parameters through a javascript code? Or any other way that you don’t need to create…
-
1
votes0
answers81
viewsSSL on shared server
I have a shared server with several sites (all mine), where one of them has SSL certificate. However, when we type https://outrosite.com.br (com ou sem www) it displays the site you are on: (without…
-
1
votes1
answer56
viewsredirecting with htacess
Guys set up my htacess to pick up any word I type in the URL and search for the php file. It works like this: www.meusite.com.br/City and it redirects to www.meusite.com.br/Search/City.php The code…
-
1
votes0
answers117
viewsSlim Framework status code 404
When making requests I get the following error. Xmlhttprequest cannot load http://www.domain.com.br/api. Response for preflight has invalid HTTP status code 404 Man .htaccess is like this:…
php htaccess http-request http-headers slimasked 8 years, 4 months ago willian rodrigues andrade 85 -
1
votes1
answer363
viewsHide directory with htaccess
Colleagues. I have the following htaccess code that I direct: RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?site.com.br$ RewriteCond %{REQUEST_URI} !^/novo/ RewriteCond %{REQUEST_FILENAME} !-f…
-
1
votes0
answers93
viewsConfigure Friendly URL in . htaccess
I’m having problems with my file configuration .htaccess. I have the following URL: www.dominio.com.br/article? reading=first-post And I wish she’d stay that way:…
htaccessasked 8 years, 3 months ago Luis Fernando 171 -
1
votes1
answer1424
viewsForce https using . htaccess on a given domain and domain only
I would like to know how to force HTTPS using .htaccess in only one domain/domain. The code I use is forcing https on all subdomains... and one of my subdominios does not have SSL, so I wish it does…
-
1
votes0
answers76
viewshtaccess configuration for wildcard subdomain
Please, I have a wildcard entry in my domain, that is, qualquerNome.meudomino.com.br redirects to mydomain.com.br. I need to configure my htaccess to redirect all entries to a file, in which,…
-
1
votes0
answers21
viewsDoubt with htaccess files
I have a question regarding a configuration in my file . htaccess. I have a page with the following name: gastronomia.php Hence in my file includes the following line to make it friendly:…
-
1
votes1
answer290
viewsError installing script on localhost
I am trying to install a script on local host, but the following error appears: Internal Server Error The server encountered an Internal error or misconfiguration and was Unable to complete your…
-
1
votes1
answer101
viewsremove ". php" using . htacces in Ubdomain
I have a problem trying to use the page without typing the extension. Ex: http://sub.dominio.com/pagina.php for http://sub.dominio.com/pagina I have tried to find on other sites about the same but…
-
1
votes1
answer692
viewsMulti Language Site / Multi Language (Automatic Country Detection without Permission)
I have a small project and would like to create a multi language system for the site. I found several forms here on the site, but I did not see any with this example, which including stackoverflow…
-
1
votes1
answer531
viewsRestrict access by htaccess
I have a dedicated server separate from the hosting of my site, some content like image, videos, texts and etc will be pulled from this dedicated, the problem is that I would like to restrict access…
-
1
votes0
answers384
viewsChange to HTACCESS: Rewritre URL to insert domain
Good morning! I have a site working today at Locaweb, and it has presented several problems of slowness and we believe to be the server. We’re trying to migrate to Hostgator for testing, and we’re…
-
1
votes0
answers41
viewsHelp . htaccess URL’s Friendlies
Hello, I’m developing an online compiler, similar to Ideone, and would like users to be able to access some of their codes already made on the site in a simpler way. Currently I use a page…
-
1
votes2
answers781
viewshow to protect access to a php file?
Galea I am using the Jquery auto complete plugin. It works perfectly. I use jquery to call a php file that queries in the Databank. I call him that: $("#auto").autocomplete("Busca/Cadastros.php", {…
-
1
votes1
answer142
viewsHow to increase connection time for download?
Within my project, in the .htaccess, have set the following settings, for a company file exchange system: php_value memory_limit 6000M php_value post_max_size 6000M php_value upload_max_filesize…
-
1
votes1
answer130
viewsUse user-friendly URL without folder navigation
I need to identify the user using user friendly url, for example: https://site.com.br/usuario/sistema.php How do I make this identification, bearing in mind that there will be no particular folder…
-
1
votes1
answer58
viewsNot returning the second parameter
I am developing an api. Basically it requests a page according to the request. Example: http://localhost/mod/<name>/<version> the problem is being /version. I made htaccess that way:…
-
1
votes0
answers236
viewsAdapt Web.Config to . htaccess
need to maintain two sites in the same hosting (one I developed, let’s call site 01) and another that is a Wordpress created by the old company that served the client (We call site 02). The…
-
1
votes1
answer181
viewsForce redirect to HTTPS environment
How to force redirect to the environment with HTTPS with HTACCESS? I need the code to be adapted to what I already have: RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond…
-
1
votes1
answer1229
viewsConfigure Slim Framework and Apache 2
Hello, good afternoon. I recently hired a linux hosting service. My site uses the Slim Framework, but I’m not able to access its routes when it’s in production, but in the xampp localhost, it was…
-
1
votes1
answer197
viewsRemove . php extension except from a file
Hello! I have my system in php, added the file . htaccess RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteCond…
-
1
votes1
answer326
viewsProblems with mod_rewrite
I’m having a problem with mod_rewrite on . htaccess. The problem is this: If I research something like Michael Jackson looks like this: site.com/search/Michael%20Jackson/82920rdn#go everything goes…
-
1
votes2
answers1016
viewsWhat’s Options Multiviews for?
I saw a code .htaccess in the Laravel Framework, whose code snippet had this: <IfModule mod_negotiation.c> Options -MultiViews </IfModule> What would that be -MultiViews? What does he…
htaccessasked 7 years, 9 months ago Wallace Maxters 102,340 -
1
votes0
answers37
views.htacess does not work on the server
Hello, when I test on my pc, it works perfectly, but when I put it on the server it stops working. .htacess RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d…
-
1
votes1
answer962
viewsHow to define a subfolder as the root of an HTACCESS application?
I have a certain PHP application written with the Silex framework. I set up the structure in a way where only the folder public would be the folder where I would point the Apache to read it. My…
-
1
votes1
answer38
viewsHow to hide the word "blog" from my wordpress site
Whenever I publish a post appears https://www.site.com.br/blog/assunto/, would like to change the URL to https://www.site.com.br/assunto/ Follow my htaccess <IfModule mod_rewrite.c>…
htaccessasked 7 years, 8 months ago Marcelo Prates 11 -
1
votes1
answer85
viewsHow to pick variable with $_GET
Hello, in my htaccess is like this: RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php?url=$1 RewriteRule ^download/([A-Za-z0-9]+)$…
-
1
votes0
answers84
viewsHow to configure Symfony in Windows?
I have an application written in Symfony 3 that I want to publish in a Ubdomain. The application is currently hosted in Ocaweb. My main website is this: example.com The goal is to create a specific…
-
1
votes1
answer459
viewsProblem with . htaccess
Good morning, I picked up a website to do some work on it. I use easyphp and can’t open any site page on localhost (only from this site) I believe it may be the . htaccess file that redirects the…
-
1
votes1
answer1162
viewsMultiple Rewrite Rules with . htaccess
I have the following . htaccess currently: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ## Esconder .PHP # Redirecionamento externo de /dir/foo.php para /dir/foo RewriteCond…
-
1
votes2
answers356
viewsHow to use . htaccess with 2 arguments
I looked on the internet, I found some examples, but I did not understand very well, for example, I need that when it is accessed site.com/stream/nome he runs the file stream.php, inside the archive…
htaccessasked 7 years, 6 months ago Lucas Caresia 2,663 -
1
votes1
answer51
viewsWordpress Multisite, site in separate directory
have a question, on Wordpress Multisite I want to know if have how I create a site in separate directory. for example the main website is in: wordpress.omegainc.com.br and the secondary site I want…
-
1
votes1
answer219
viewsRedirecting with htaccess
I need to do a direction when the user accesses, https://www.dominio.com.br/portal/qualquercoisa is directed to https://www.dominio.com.br/blog You can do this with . htaccess? It follows code I…
htaccessasked 7 years, 6 months ago Maurício Krüger 1,848 -
1
votes1
answer498
viewsHow to redirect only one directory to http instead of https?
I have a Mac store that is configured to use https on the front. But I need a directory to force the use of http. How can I do that? I tried using the following in htaccess: RewriteCond %{HTTPS} off…
-
1
votes1
answer150
viewshtaccess with friendly url not working(?)
I’m finishing a project, and I thought I’d put a user-friendly URL, one I had already used in another project, the same thing, I didn’t change anything, just the server and site host. Of:…
-
1
votes1
answer268
viewsDomain forwarding in file . htaccess
I have a domain like this: https://www.dominio.com, that always has to access this way. So I need to do some redirects. These are the ones: Of: (http) www.dominio.com.br (http) www.dominio.com…
htaccessasked 7 years, 5 months ago Diego Souza 16,524 -
1
votes1
answer120
viewsHow to remove file names on a single page?
On the home page of my website, I would like to remove all filenames from the URL, I want it to stay only the domain. For example, if I have such a site: www.site.com.br/algumacoisa/principal.php On…
htaccessasked 7 years, 4 months ago JavaMan2.0 11 -
1
votes1
answer189
viewsUser-friendly URL with htaccess pointing
My site is in a subfolder, I want the path to work independently of what I enter in the name of it, for example: www.meudominio.com.br/something/index.php…
-
1
votes1
answer1226
viewsConfigure web.config file for PHP project in subdirectories
I have a website on php in test phase in a directory above the root of the official website. To configure the friendly URL (remove the entension . php) is for web config.. I made a rule that doesn’t…
-
1
votes2
answers76
viewsHow to redirect on first access another page instead of index?
I think it’s easier to understand like this: When I enter my domain: www.site.com.br Usually goes to index.php But I don’t want it to go to index, but to start.php What an htacess rule would look…
htaccessasked 7 years, 4 months ago userJohnNotSoDoeGrey 11 -
1
votes1
answer101
viewsRedirect through htaccess
I migrated from one site to another server. On the current server, all posts on the site had an index.php in the link www.MEUSITE.com.br/index.php/test on the new server I want to stay…
-
1
votes2
answers343
viewsDynamic url with php
I have this url on my website categorias.php?id_categoria=1 I want to make a rule to stay produtos/nome-categoria Since the category name I’m already pulling from the bank with php my . htacsess is…
htaccessasked 7 years, 4 months ago Wagner Martins Bodyboard 698 -
1
votes1
answer133
viewsProblem using Friendly Url
Where I’m going wrong on this . htaccess ? RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L] the site I developed works normally on…
-
1
votes2
answers1900
viewsblock access to a particular directory via htacess
Well I have a folder at the root of my site called logs. Inside it I will save the logs that custom bugs that mount. Good need to lock this folder not to be accessed by anyone, just by me via ftp.…
-
1
votes0
answers142
viewsBeginner in . htaccess (relatively simple case)
I’ve searched multiple sources for a way to correctly apply a simple rule in htaccess for user-friendly url interpretation. At first I have the codes below: .htaccess RewriteEngine on RewriteCond…
-
1
votes1
answer359
viewsProblems . htacess
I built a site in Joomla and we are deploying in the client server (UOL HOST) but I ran into a problem. The old site was inside the ftp folder: dominio.com.br/web We put the files in another folder…
-
1
votes0
answers158
viewsHow do I place an htaccess friendly url in the place I want?
I’m using this code: RewriteRule ^editar/candidato=([0-9]+)&admin=([0-9]+)/?$ http://localhost/MeuSite/candidatoeditar.php?candidato=$1&id=$2 [QSA,NC,L] But I’d like the link to stay that…
-
1
votes1
answer49
viewsHow do I change the order of the URL Friendly parameters in htaccess?
My URL friendlyl is like this: guaraparivirtual.com.br/news-Gadfly/Moqueca-capixaba-agua-na-boca/9/ I would like there to be an exchange of the order of place of the parameters from the last to the…