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
answer1293
viewsMode to translate website automatically
I have a Portuguese site written in PHP and HTML. I would like to offer this site to other countries, but without having to translate all content manually. So I would like a tool that translates the…
-
1
votes1
answer173
viewsHow to work with absolute URL?
I am developed a system and to perform the tests I’m using the xampp. IE, everything is accessible through the address: localhost/meusite/... To call all links on my site, as well as include files,…
-
1
votes1
answer451
viewsObject not found - Error 404 in htaccess
On a site I develop, when writing a link that does not exist, gives me error according to the following image. I intend that, when writing a link that doesn’t really exist, show an error 404 page…
-
1
votes0
answers89
viewsSimultaneous access
Is there any way to limit simultaneous access without using the database? Is there any way to do it using . htaccess? Because I am trying to limit access to a file that does not come in the PHP…
-
1
votes1
answer89
viewshtaccess replace "_" with "-"
I have this code that I’m using in my MVC that I did for studies: class Como_Funciona extends Controller { public function __construct() { parent::__construct(); } public function index() { $data =…
-
1
votes1
answer62
viewsProblem with regular expression in . htaccess
I have the following URL: http://< site >/restrito/usuarios/pagina/ This page is responsible for displaying a table containing users registered in the system, can receive as variable numbers…
-
1
votes1
answer845
viewsremove the php extension and force the entire page as https via htaccess
Folks I’m trying to rewrite in . htaccess to force https on all pages and hide the . php extension. He’s staying at the kinghost and I already have the certificate. I have separate codes but I…
-
1
votes1
answer213
viewsRule conflict in . htaccess
I am facing an error with . htaccess file and I am unable to resolve, is the following: I have the following rule: RewriteRule ^([^\.]+)$ $1.php [NC,L] This rule aims to ignore the . php extension…
-
1
votes0
answers44
viewsRedirects with Htaccess
I would like to elaborate an htaccess configuration that is more or less with the following rules. When accessing http://subdominio1.meusite.com.br/ direct to a specific folder and when accessing…
-
1
votes1
answer32
viewsConvert "query" to an HTML form using . htaccess
I need to make a conversion of a "query" of an HTML form that must pass information to do a database search. I think it might be something like a sort of "friendly url," of the simplest. Basically…
-
1
votes0
answers40
viewsWhat would be and how to use Namevirtualhost *:80?
I am installing a new site pre-configured, but for it to be installed you need to create a configuration file as follows: This part of the documentation is vague for me, and I didn’t understand what…
-
1
votes1
answer417
viewsHow to change the site URL.com.br/index.php to site.com.br/ through . htaccess?
I have the URL with the following pattern: https://dominio.com.br/index.php I tried to change from index.php to nothing, that way: https://dominio.com.br/ With the following rule: RewriteEngine On…
-
1
votes0
answers2002
viewsRedirect with htaccess without changing URL
I have a system that runs on the address www.dominio1.com.br/sistema and need the user to type www.dominio2.com.br/sistema is directed to www.dominio1.com.br without changing the URL. I did a test…
-
1
votes1
answer44
viewsFile . htaccess settings
Hello noble friends I am a beginner here at Stack Overflow and beginner in programming Volleyball of 04 grandchildren 54 years. What configuration to do in . htaccess for protection of directories,…
htaccessasked 7 years, 1 month ago Telêmaco Barbosa 21 -
1
votes1
answer69
viewshtaccess redirection
I have the following redirect: RewriteRule ([^/]*)\/([^/]*) http://ip/~user/codigo.php?nome=$1&numero=$2 To generate the url: http://www.site.com.br/stackoverflow/123456 But there are other…
-
1
votes2
answers218
viewsI cannot capture ROUTE without using index in URL
In short, it only works if I put index.php in the URL. I think it’s in . htaccess, but I don’t know where. I wonder which configuration is incorrect or what could I do to find my error. Data:…
-
1
votes1
answer250
viewsForwarding from other domains (http/https) to main (https)
Fala galera! I have a question about https redirect. I have a ". com" domain (SSL installed), but ".com.br" doesn’t have SSL, I just redirect it to ". com" with SSL, until then blz, but, if I try to…
-
1
votes1
answer276
viewsFriendly url does not accept bar after link
I have in . htaccess the following code: RewriteRule ^([a-z0-9-]+)/?$ categoria.php?key=$1 [NC,L] It works perfectly, but when I put the bar after the link, it opens the page without CSS formatting,…
htaccessasked 7 years ago user24136 -
1
votes0
answers142
viewsProblems with . htaccess root folder and https redirect
I have a problem here, I have no knowledge of .htaccess and I’m not getting it set up. I need him to redirect the domain without www to the domain with www, an error is that it is redirecting all…
-
1
votes1
answer535
viewsHow do I force . htaccess to direct a domain into a folder?
I don’t understand much of it. htaccess from apache, so I would like to ask colleagues if it is possible what I am going to explain, I have a domain: mycard.com.br and a domain test.mycard.com.br…
-
1
votes1
answer57
viewsApply two functions to . htaccess
I don’t quite understand the . htacces, but I use it to force the navigation of my site to the https, now I’m trying to implement a code to remove the .html but when I put the two together it…
-
1
votes0
answers454
viewsProblems with . htaccess when hiding public folder
I need to deploy for production of an application that I migrated to Aravel 5.4, in test environment I am using the virtual host in windows where I type in the url 'meusite1' and until then beauty.…
-
1
votes1
answer37
viewsR=301, htaccess redirect to the new page
Well I created a page with the custom URL RewriteRule ^produtos/([A-Za-z0-9-]+)/?$ produto.php?product=$1 [NC,L] good, up to there ok, the new link works But I’m trying to block direct access…
-
1
votes1
answer185
viewsHow do I load CSS when using Apache-Friendly URL?
My CSS does not load the content when I started using the user-friendly URL. Try using the tag <base href="localhost/guiacomercial/" /> and within the .htaccess RewriteBase / 'Cause the…
-
1
votes1
answer185
viewsError to 404 when setting Friendly URL in . htaccess
Is giving 404 error while accessing the Friendly URL I tried to do by .htaccess: RewriteRule ^es/guarapari/([0-9]+)/([[a-z0-9-]+)/?$ empresas.php?id=$1&nome=$2 [NC] .full htaccess: <IfModule…
-
1
votes1
answer368
viewsUser-friendly URL with Jquery
Hello, everybody! My system is developed in Jquery, so I make changes to pages without loading, only with $.get(). The big question is: even without loading, I need the URL to be changed, making the…
-
1
votes1
answer429
viewsHtaccess Wordpress URL Problem
I have a project that has an institutional website (main domain example: client.com.br) and a blog with Worpdress in sub-domain(example: blog.cliente.com.br). I have an htaccess in the root…
-
1
votes0
answers22
viewspassword . htaccess
Good morning to all, so guys I’m riding a movie server and I have several movies in a vps and my site is housed in hostgator. Can I put a password with . htaccess in my vps and authenticate with the…
htaccessasked 6 years, 11 months ago Carlos da Silva 101 -
1
votes1
answer122
viewshtaccess redirect 301 URL that does not exist
There was an old site and all its Urls were changed. A URL that was well found in Google was: meudominio.com/datacenters Now I want to redirect this URL to: meudominio.com/data-centers In htaccess I…
-
1
votes1
answer869
viewsDynamic subdominio with htaccess and php
I’m racking my brain. I need to create dynamic subdominios for each user who registers on my site (e.g., user1.dominio.com.br, usuario2.dominio.com.br, usuario3.dominio.com.br) without having to…
-
1
votes2
answers383
viewshttp redirect to https via . htaccess - Godaddy
I signed an SSL certificate, installed the certificate but my site does not appear in https. support told me that I have to change the file . htaccess and redirect to https, but I already searched…
htaccessasked 6 years, 10 months ago jhonatan santos 103 -
1
votes2
answers143
viewsHtaccess that directs to https and also to www
I need that when the user accesses with http is directed to https and when access without www redirects to access with www. I’m using the following code on .htaccess: <IfModule mod_rewrite.c>…
-
1
votes0
answers97
viewsHow do I make a PHP friendly url?
I would like to use this to mask the data contained in the url,. something similar to: localhost/webservice/networks.php? parametro=1 by localhost/webservice/networks/consult/ how do I do that?…
-
1
votes2
answers56
viewsMy site is not redirected to https
I’m trying to get my website redirected to htpss, but I’m not getting it. below is the code in htaccess RewriteEngine On RewriteCond %{HTTPS} !on [OR] RewriteCond %{HTTP_HOST} ^www\. [NC]…
-
1
votes0
answers80
viewsHow do I activate resource compression with gzip or deflate on my website?
I cannot activate resource compression with gzip or deflate on my website. On the server the option is already enabled and on .htaccess also, only that page speed still keeps saying that compression…
-
1
votes0
answers26
viewsDoubt with htaccess (location x hosting)
Hello, I’m doing a project and was adding it online to make a test, locally everything works, I have my ".htaccess" so: Options All -Indexes RewriteEngine On RewriteRule ^([-a-zA-Z0-9]+)$…
-
1
votes0
answers159
viewsNginx Friendly Urls
I’m trying to create a Urlammable on my server, previously I used apache with this htaccess: RewriteEngine ON RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule…
-
1
votes1
answer147
viewsurl friendly rewriting
Hello, all right? I need my homepage url to look like this: http://meusite.com.br the home page url is appearing like this: http://meusite.com.br/? sourceId=78902565&categoryId=5 A second page…
-
1
votes0
answers114
viewsCross-orgin with Laravel and vuejs
In my dilemma to publish my application I am facing some problems. I am making the front separate from the back. The frontend is in vuejs and the backend in Laravel (being only an API) On the server…
-
1
votes0
answers98
viewsURL friendly with anchors
I’d like to know how I use the .htaccess to make url anchored friendly. Ex: www.meusite.com.br/index.html#servicos stick around: www.meusite.com.br/servicos…
-
1
votes2
answers812
viewsBlock access to subfolders in the URL (Wordpress) from the 403 Forbidden
I hope my doubt is clear: I’ve seen images uploaded by Amazon Cloudfront that has its URL "differentiated" for images and blocks all subfolders of the path if the user tries to access. Explain. URL…
-
1
votes1
answer190
viewsHow can I change my homepage URL in Wordpress?
I have a site in Wordpress, when access it gets dominio.com, but I want only the index from it move to www.dominio.com/home. That is, when you access www.dominio.com, change to www.dominio.com/home…
-
1
votes1
answer73
viewsRe-write url with htaccess
For lack of experience, I’m having difficulty rewriting my blog url, I tried as below: http://www.meusite.com/blog/article.php?a=3&v=5&at=teste-do-primeiro-post In the end I would like the…
-
1
votes0
answers39
viewsAccess to subfolders in the URL is being blocked by . htaccess
Hi, I have a url for a system where "test" in a subfolder within the system directory. The .htaccess directs the index to a file "php app." what is the file that makes the autoload of the system.…
-
1
votes0
answers50
viewssitemap with PHP - Tuning in htaccess
I have this excerpt on .htaccess that is working for my current need: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI}…
-
1
votes1
answer105
views.htaccess - Two websites, different domains in the same hosting
Guys to with a question, I wonder if it is possible to redirect a domain to a subfolder of a hosting with a website without changing the browser URL via . htaccess. Example: domain 1 - Accommodation…
-
1
votes2
answers147
viewsAccess control Access-Control-Allow-Origin on the Apache PHP server side
I don’t know much about PHP and I’m trying to create an application to automatically register products from my online store directly in Mercadolivre. Ad data is captured with JavaScript and sent to…
-
1
votes0
answers125
viewsRedirect 301 with Webconfig
I use a rule that works more does not seem correct. I think it ends up giving two redirect 301. <!--Forçar https--> <rule name="Https" stopProcessing="true"> <match url="^"…
-
1
votes0
answers133
viewsNON-WWW | Force HTTPS | Sub-areas
I’ve been having trouble setting up my htaccess. I’ve tried many settings I found on the internet and even some here and no success. I need my htaccess to have the following features: Always use…
-
1
votes1
answer48
viewsUser-friendly URL receiving p/PHP value
My doubt lies in this URL: site.com/embed.php?id=a48sa4d2a3s4d65a1s5d6a1sd56 I get that amount for $_GET['id']. How can I turn into one URL beautiful and organized? Example:…