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
answer86
viewsAccess specific folder project
I have the following url http://localhost/meuApp Angled My file . htaccess is like this: RewriteEngine On # If an existing asset or directory is requested go to it as it is RewriteCond…
-
0
votes1
answer52
viewsProblem with . htacess Url
Good afternoon guys, I’m having a problem in my . htacess, I’m doing a test by xampp, only it returns me page not found or similar, I’ve done N form and nothing, man . htacess it takes the end of .…
-
0
votes0
answers30
viewsProblem in file compression and caching in wordpress and page insights score
all right? I have a problem in the process of improving the score in google page insights. The current score is +-40 and the google report points out the following issues: Enable text Compression…
-
0
votes1
answer273
viewsWordpress and Laravel in same server and same domain
I have a Wordpress configured in a root folder on the server and created a subfolder with a Laravel, WP works normally, but Laravel opens only index, when I try to open the routes open a WP error…
-
0
votes1
answer189
viewsError 404 in project
I have some settings in the file config/app.php of my project, as: 'base_domain' => 'aplicacao.com.br' 'url' => env('APP_URL', 'https://cliente.aplicacao.com.br') In my route files, I have:…
-
0
votes0
answers27
viewsFile . htaccess and php route
I’m having trouble creating a route on my localhost that will be later placed on the www server, it always redirects to the 404 even the existing folder, follow settings that esotu using file .…
-
0
votes0
answers24
viewsCross-origin locked in Xmlhttprequest
My javascript function is on https://subdominio.site.com.br/ tries to reach a file .JSON via GET in the main domain https://www.site.com.br/ and the return is the error in the browser console.…
-
0
votes0
answers14
viewsError page does not work for error 403
My 404 Pages are working normally, however... When I type /" after my url, the default page of error 403 appears and not the one I did, the same happens for others like 500, when I type /%after the…
-
0
votes0
answers10
viewsRewrite HTACCESS PUT URL
I’m trying to rewrite the following URL: meusite.com.br/teste.php para meusite.com.br/new I created the following rule in HTACCESS RewriteCond %{REQUEST_URI} ^(.*)/teste.php$ RewriteRule .*…
htaccessasked 3 years, 2 months ago Fábio Santos 281 -
-1
votes2
answers888
viewsFree access in Wordpress directory to print images? . htaccess
I have a problem in Wordpress, I am uploading the images in a specific directory and I need these images to be viewed directly by URL. From the root of the portal there is a directory called server…
-
-1
votes1
answer67
viewsError 500 when using rewrite with the same file name (/tag/ does not go to /tags.php)
I recently migrated my server to Ubuntu 14.04 with PHP 5.5.9 and Apache/2.4.7, but the rewrite that has string file name simply doesn’t work. Error 500 RewriteRule ^tag/?(.*)/?$ /tags.php?tag=$1 [L]…
-
-1
votes1
answer846
viewsHow to Fix Friendly URL?
I migrated my Joomla site to another server but it is only working Home, internal pages give error 404. I have already enabled/disabled the Joomla-friendly URL option, I have seen htaccess as well…
-
-1
votes1
answer279
viewsURL forwarding keeping the address
I am using my server to host other websites because my hosting plan allows, however, I would like for example when accessing the directory www.meusite.com.br/outrosite appear in the address bar the…
-
-1
votes1
answer77
viewsHelp in creating the . htaccess file
Hey, fellas, good afternoon. I’ve been trying for days to create a nice . htaccess, but we’re having some difficulties. Here are examples of what I need, remembering that everything needs to be in…
-
-1
votes3
answers1281
viewsUrl friendly to MVC
I am trying to create a . htaccess to make the site urls friendly, the page display will always be on index because I am using MVC. I am following a pattern with the ato parameter in the url to…
-
-1
votes1
answer372
viewsHtaccess accept bar at end
I would like to know how do I accept my URL bar at the end /, since this way, when I add bar, the images and css are based on the URL with the parameter, generating error in loading.…
-
-1
votes1
answer679
views.htaccess returns error 500 instead of 404
My file. htaccess seems to be ok, but if we try to access a page that doesn’t exist, instead of getting the 404 error reply, I get the 500 error reply. This is the current code: RewriteEngine On #…
-
-1
votes1
answer346
views.htaccess to prevent navigation
I have a Debian server and the directory to put projects in apache is the traditional /var/www/html, I’m trying to block browsing directories and sub-directories through the browser with . htaccess…
-
-1
votes1
answer178
viewsHow to restrict GET requests from other sites?
I’m trying to stop other sites from copying my download links, but they’re unconventional (they don’t have format at the end), so I can’t block through Apache mod_rewrite. So I decided to block GET…
-
-1
votes1
answer437
viewsHow to block access to a htaccess page?
need to block access to a Page (URL) with htaccess, for example: http://site_exemplo.com.br/noticias/como-bloquear-acesso-a-pagina I want to block via htaccess…
-
-1
votes1
answer705
viewsHow to change the root of my site, since the folder is on a level above?
My doubt is in the escalation of .htaccess, because I can only make the root of my site the folder public_html or some other folder inside public_html, but I need a folder that’s one level up.…
htaccessasked 6 years, 2 months ago Tecnologia Grupo Posture 1 -
-1
votes1
answer17
viewshtaccess redirect if extension and folder do not match
I want to have it redirected to my domain if it’s not a. php file or certain folders. php I got it: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f RewriteRule \.(php)$ - [L] RewriteRule (.*)…
-
-1
votes1
answer1359
viewsHow to redirect site to another folder at public_html level using htaccess
I have a website created and the files are in the public_html folder. We created a new one in the 2018 folder that is at the same hierarchical level as public_html How can I access domain.com.br, it…
-
-1
votes1
answer99
viewsMy website error 404 when use https redirect
My website error 404 when I switch htacces to redirect http to https, the code I’m using in htacces: RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTPS} off…
-
-1
votes1
answer32
viewsTemplate and htacess Wordpress page
In Wordpress: On a template page: I have a link: <a href="http://localhost/wpcurso/exercicios-questoes/?id='.$row->id_exercicio.' " >' . $row->titulo . '</a> That points to another…
-
-1
votes1
answer54
views.htcaccess 301 redirect does not work
The redirection of https://www.meusite.com for https://meusite.com doesn’t work. And as a result I get the site in duplicate, one page I’m logged in and the other not. <IfModule mod_rewrite.c>…
-
-1
votes1
answer41
viewshtaccess is not targeting HTTPS without WWW
I’m trying to direct the domain to https://com. htaccess but the address typed without using www ex: "meudominio.com.br" is not redirecting, leaving the domain at http:// common, I wonder what’s…
-
-1
votes1
answer530
viewsForce https, www and bar at the end of the URL with . htaccess
Good afternoon Personal. I’m trying to get . htaccess to force three things. Always access with https, www before the domain and a bar at the end of the URL. Always following this pattern:…
-
-1
votes1
answer664
viewsRedirect with . htaccess, from www folder to public project folder
I need to set up a redirect through . htaccess. My "DOCUMENT_ROOT" (using Apache and PHP) is set to "www", which is the root of the project, but index.php is in the "public" folder". I don’t know if…
-
-1
votes1
answer32
viewsSwap site root directory with htaccess
How to make sure that when a person accesses the site, the . htaccess recognizes that the site is on /site instead of /, /website where it will contain all the files of the site. And when accessing…
-
-1
votes0
answers9
viewsAdd bar at end of htaccess URL
Interning in a company I’m helping to migrate a site to PHP due to the site racking with Google the urls need to finish with the bar, but we ran into some problems, in htaccess this way:…
htaccessasked 3 years, 2 months ago Thiago Oliveira 1 -
-2
votes2
answers322
viewsRedirect parameters . htaccess
I would like to know how to redirect a url with parameters on .htaccess . I have a URL that can receive several parameters and I want to redirect it to another page with these parameters. The page…
-
-2
votes1
answer31
viewsGet domain name dynamically in htaccess file
I have a. htaccess file with several instructions. I would like to make it more dynamic, that is, make it more optimized for other sites without having to edit it. Lines like the ones mentioned…
-
-2
votes1
answer204
viewsCSS does not load on mobile version when installing free SSL certificate
I installed an SSL certificate https://zerossl.com/ on a website. The certificate is working normal. The problem is that in the mobile version of the site the CSS is not loaded, on the other hand,…
-
-2
votes1
answer54
viewsDirect via . htaccess a query string
I have a system where there will be multiple users. Each user will have his own subdomain. Ex.: usuario1.sistema.com.br usuario2.sistema.com.br For this I created the subdirectories and in each of…
htaccessasked 6 years, 3 months ago user24136 -
-2
votes1
answer111
viewsUser friendly URL on specific page
I am with a customer project in production (Locaweb then n has Cpanel :|) and have a news page and need to leave the same with friendly URL, the page php news. has the following code: How do I leave…
-
-2
votes1
answer71
viewsHide page extension and skip bar at the end
I currently use the following code to hide the extension on the pages of the site: RewriteEngine On Options +FollowSymLinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d…
-
-2
votes1
answer408
viewsError redirecting to https UOL Host
I have a website hosted on UOL HOST. I’m setting up a .htaccess in the hope that 2 things will happen: A) All access by http be converted to httpS B) Any and all access (Links existing and…
-
-2
votes1
answer284
viewshtaccess removes a bar (/) from the url when using WWW in the Prestashop
I have a version 1.7.6 multi-store installation enabled. At first, Prestashop set up htaccess already. Each store is accessed as follows: https://meudominio.com/loja-a https://meudominio.com/loja-b…
-
-2
votes1
answer204
viewsRedirect user to public folder and restrict access to project root files
I am making use of a MVC structure with PHP and, for security purposes, my index.php file that loads the configuration files and gives the bootstrap in the project is inside the folder public/.…
-
-2
votes2
answers33
viewsForwarding of domains
I’m having trouble setting up the redirect Htaccess 301 for a domain. The main domain is the https://www.webfreela.com I need the combinations below to be directed to the main: https://webfreela.com…
-
-2
votes1
answer177
viewsHow to Disable caching on specific links via htaccess?
After doing a lot of research on the subject, I will rephrase my question. It’ll get clearer: On my website Wordpress, i would like to set the expiration of html files only on the homepage of the…
-
-2
votes1
answer33
viewsModify htacess to allow download of xml files
I have the following code in my file ". htacess" RewriteEngine On #Options All -Indexes ## ROUTER WWW Redirect. #RewriteCond %{HTTP_HOST} !^www\. [NC] #RewriteRule ^…
-
-2
votes1
answer210
viewsURL Friendly: How to insert a php variable into a URL
I’m working on a PHP ad system for autonomous professionals where I’m having a hard time including the title of this ad within the page URL making it a friendly URL. I found some similar issues, but…
-
-2
votes0
answers19
viewsHow to configure . htaccess and PHP to use user-friendly URL with parameters
I set up my .htaccess to use the URL Amigáveis on the site I’m developing, but I’m having a hard time passing and receiving parameters, by the rule that defines everything that is entered in the URL…
-
-3
votes1
answer140
viewsHow to redirect the old domain to the new one?
I would like to redirect the old domain to the new one, in the current code is occurring infinite loop. Follows my code: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule…
htaccessasked 8 years, 8 months ago Amadeu Antunes 3,331 -
-3
votes1
answer158
viewsTurn HTACCESS into Web.Config
I would like to ask for help to export this HTACCESS (linux) for Web.Config (Windows) RewriteEngine on RewriteCond %{REQUEST_URI} !^/admincp/$ [NC] RewriteRule…
-
-3
votes1
answer1383
viewsFriendly URL with . htaccess
I would like to leave my url which is like this: https://assistir.xyz/embed/filme.php?id=tt0120737 to look like this https://assistir.xyz/embed/tt0120737 You have to let some make a file . htaccess…
-
-3
votes1
answer93
views.htaccess does not accept file for 403 error
I did so in mine .htaccess ErrorDocument 403 /403.php But gives the error 403 rather than display the page of error! If I do: ErrorDocument 403 403.php That is, in/ before 403. Text appears 403.php…
-
-3
votes1
answer29
viewsUser-friendly URL does not work properly
I am new with friendly url, the other ones I put work well but one in question is not working RewriteRule ^imovel-([0-9]+)\/([a-z]+)\.html$ imovel.php?m=$1&n=$2[NC,L] In theory the result should…