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
votes0
answers35
viewsfile . Htaccess
I am using the following configuration in the Htaccess file: RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?dominio.com.br$ RewriteCond %{REQUEST_URI} !^/pasta-destino/ RewriteCond…
-
0
votes0
answers38
viewsUrl friendly . htaccess?
How I turn this url: http://pagina.com.br/detalhe-candidato.php?idcandidato=5&nomecandidato=PC%20Siqueira in this: http://pagina.com.br/5-PC-Siqueira With htaccess? If yes, how? Thank you…
-
0
votes1
answer35
viewshtaccess returns $i
Good evening, I made a code htacces like this: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] RewriteRule ^app/([0-9]+) app.php?id=$i The first Rule is to…
-
0
votes1
answer310
viewsRedirecting Urls from the same domain via htaccess
I would like to direct through the htaccess two url of the same domain, type 301. Example: Redirect meusite.com.br/customer-service for meusite.com.br/central-atendimento I tried the following code…
-
0
votes1
answer44
viewsUrl in htaccess
Is it possible to control the url in htaccess? For example: if you type site.com.br it corrects and places www.site.com.br. I have a case that some pages go with site.com.br/blog. Others with…
-
0
votes1
answer72
viewsHow to upload an Error 404 page to the website and another to the HTACCES application?
.htacess of the site # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond…
-
0
votes1
answer49
viewsCreating automatic htaccess urls limiting minimum number of characters
RewriteRule ^(.*)/([0-9]+)$ /nomes.php?nome=$1&matricula=$2 I need to determine that the $name redirect has at least three characters. I did something like this: $nome =…
-
0
votes1
answer256
viewsDynamic friendly URL . htaccess
I currently have the following rule in . htaccess: RewriteRule ^fale-conosco/?$ view/fale_conosco.php [NC,L] And I would like it to be possible to inform a friendly URL after contacting us/.…
-
0
votes1
answer437
viewsHtaccess - Redirect all requests to a single file every time
I am trying to use a. htaccess file to redirect all requests to a single file, but I am facing some problems. My . htaccess is like this: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f…
-
0
votes1
answer924
viewsHow to make URL friendly with . htaccess with Variable in URL
Example I have link like this: https://meusite.com/linkdireto/? id=999 You can access it like this: https://meusite.com/linkdireto/999 So keep the URL but clean, I know you have how to do, but I…
htaccessasked 6 years, 5 months ago Matheus Vitor 505 -
0
votes1
answer90
viewsHow to rewrite a URL
Good afternoon, everyone. Could you help me with my question ? I wanted to rewrite a URL. For example: <a href="#Contato">Contato</a> which points to a DIV Contact ID, however, the URL…
-
0
votes1
answer79
viewscodeigniter development subfolder does not work
good morning. I am maintaining a PHP back-end that uses the codeigniter framework. To test the new codes, I created a subfolder in the system (testing) and copied the files from the main directory…
-
0
votes0
answers40
viewsMy user-friendly URL does not pass variable by GET
I already looked at the questions related to this problem here in Stack and I was not successful, currently I am able to pass the values through the URL but I can not call them on another page with…
-
0
votes0
answers31
viewsHelp with friendly url
I have no knowledge of programming, however I dared to develop a site and I’m having problems so that the url shown in the browser appears in a friendly way and I would like the help of noble…
-
0
votes2
answers99
viewsRemove . php extension from pages , but appears ERROR 404 - PAGE NOT FOUND
I’m looking to remove the . php extension from my web pages. Created a file . htaccess as below and put in the root directory DirectoryIndex index.php RewriteEngine on RewriteCond…
-
0
votes0
answers40
viewsNGINX - ERR_TOO_MANY_REDIRECTS when rewriting htaccess rules
I am trying to convert some htaccess rules to NGINX and am getting ERR_TOO_MANY_REDIRECTS. The htaccess code is this https://pastebin.com/UwGnNybj Options +FollowSymLinks -MultiViews # Secuirty…
-
0
votes1
answer176
views.htaccess Wildcard (wildcard) and specific domain
I have the following file structure (example): /usuarios /admin .htaccess I successfully set up the . htaccess so that, when accessing the url below, all are directed to the users folder, and…
htaccessasked 6 years, 4 months ago Leandro Santana 35 -
0
votes1
answer149
viewsRedirecting pages with . htaccess php
I wonder if you have how with . htaccess, do the following redirect: Url: https://exemplo.com/sales and https://exemplo.com/admin When the user type or sales or admin he redirects to the page:…
-
0
votes4
answers167
viewsHelp with PHP and htacess Friendly URL
I am new to PHP programming, I created a dynamic website using the following code: <nav> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link"…
-
0
votes1
answer756
viewsChange URL in localhost (.htaccess)
I would like to change the URL of my local server. I use XAMPP. I believe it is necessary to create or change the .htaccess. Actually, I already created the file and put it in the root of localhost,…
-
0
votes2
answers243
viewsHow do I hide the full url and leave only the main url visible?
I have a website meusite.com I put the version for him on desktop and mobile. When the person accesses, the user agent sees that it is cellular and redirects to the cellular version: meusite.com/…
-
0
votes1
answer188
viewsHow to pass a second parameter using . htaccess to php code?
I’m writing my api using . htaccess-friendly urls to do the redirects. When I need to pass a second parameter, I’m having problems My file . htaccesss is like this: RewriteEngine on RewriteCond…
-
0
votes1
answer123
viewsHow to use URL friendly?
I’m doing my TCC and the theme is SEO, to complete need to put URL friendly since the current link is like this: php post? id=79 Well, I looked into it. htaccess and managed to make the main pages…
-
0
votes1
answer109
viewsSolved - Rewrite HTTP to HTTPS with Let’s Encrypt
I have the . htaccess file with the following content: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$…
-
0
votes1
answer29
viewsRewrite . htaccess URL for profiled site
All right? I’m making a PHP platform with a public profile. It would need my single.php file to be rewritten in the URL whenever someone accesses for example: meusite.com/Fillipe or…
-
0
votes2
answers125
viewsUse . htacess to change site to another language
Good afternoon, I have a website that needs to have the English version, so I thought I would have a folder /Eng/ and just change this url but the site in Portuguese I already use htacess to have…
-
0
votes1
answer95
viewsSubfolder configuration in htaccess
Well I have a lodging with the following structure: index.html .htaccess app site Well, inside the app folder I have an application compiled in Angular 7.0 and inside the site folder I also have a…
-
0
votes1
answer15
views.htaccess select file and not folder
I have at the root of the site the files . html "index, services, gallery and contact". I also have a folder called "services". i am trying to use this code to let the url’s friendly: RewriteEngine…
-
0
votes0
answers343
viewsHow to configure . htaccess to block direct access to all directories except public
I have a problem with setting up . htaccess, I want the user to have access only to the public folder, so I created a . htaccess at system root blocking access to all folders and files, and one in…
-
0
votes1
answer95
viewsConflict of conditions in htaccess
Hello I’m starting to try to work with friendly Urls now, so I’m not sure I’m doing the right thing. Here’s the thing: I have a site made totally without the use of htaccess, so it has huge links,…
-
0
votes0
answers22
views.htaccess add http redirect exception to https?
I need the entire site to be redirected to https, but with a single page in exception. This page is running a iframe http and I hope that it will not be redirected to .https. I tried it this way:…
-
0
votes2
answers85
viewsblock wordpress 'author' page
Friends, I am trying to block via htaccess when someone tries to access the wordpress 'author' page ( http://meusite.com.br/? Author=1 )... I thought this solution presented here at the forum would…
-
0
votes0
answers53
viewsWebsite defaced after change in . htaccess
I developed a website, but went to .htaccess of the project to apply a rule to force the HTTPS on the page (For exploratory purposes only, I would not apply this way.). See below the implemented…
htaccessasked 5 years, 9 months ago Lougans de Matos 391 -
0
votes2
answers456
viewsblock access to a particular directory via htaccess with password
I currently have a server where I leave my web projects running, some of them in Laravel, so far without problems, however I want to create a password restriction on .htaccess to the root, For…
-
0
votes1
answer157
viewsHow to customize htaccess-friendly url by passing only Slug as visible parameter?
Hello, I seek to customize the friendly url more this way www.portalvidapet.com.br/radium-hotel-em-guarapari without having to pass another parameter visible in the url. For that, I tried to do the…
-
0
votes0
answers214
viewsHtaccess does not work on hosting server
Rewrite mode in htaccess only works on local server when put it to me hosting provider does not work properly, I have this core class class Core { public function run() { $url = explode("index.php",…
-
0
votes0
answers31
viewsBlock file get content
Is there any way to block sites from using file get content and copy the page from my site? are creating "bots" from my site, I believe it is with this, will have some way to block with htaccess or…
-
0
votes1
answer53
viewsIn regular expressions in . htaccess, what does this rule mean?
What this rule is doing exactly? RewriteCond %{HTTP_HOST} ^(www\.)?website\.com\.br$ RewriteRule . - [E=REWRITEBASE:/]
-
0
votes1
answer78
viewsRule for . htaccess
I need the final url of my page accepted ., numbers, letters and underline however in the format I’ve been trying not to work, php returns me in the value of the parameter .php (???) Example, the…
-
0
votes1
answer45
viewsProblems with PHP Sessions and Ajax Requests
That’s for the beast, haha. I have a hosted website (privacy I will not disclose the link) that the segment is from personal protective equipment. Have products to add to cart. Problematic situation…
-
0
votes1
answer245
viewsHow to redirect Subdominio to specific folder from using . htaccess
I created the subdomains using wildcard I would like to understand how I can solve the following problem with . htaccess: usuario.site.com.br -> (Aponta para pasta Usuário) fulano.site.com.br…
php codeigniter web-application htaccess domainasked 4 years, 3 months ago marcos vinicius Mulinari 24 -
0
votes1
answer125
viewsrecover url value without refresh
I’m trying to recover the value of url for $_GET with php, I am absolutely sure it is impossible not to give refresh, something else as I would pass the title of each page also? php <?php if…
-
0
votes1
answer97
viewsUser-friendly URL with more than one parameter with . htaccess php
I am having problems with my URL friendly, I have a code that already works, however for a specific directory. .htaccess RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond…
-
0
votes1
answer39
viewsHTACCESS gets GET, but prevents receiving POST
I am using the following command in HTACCESS to use Friendly URL: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-z0-9-]+)/?$…
-
0
votes1
answer37
viewsHow to remove html extension from urls
Hello. I built a website, but I can’t "hide" the "html" extension of the urls, even using, after a lot of research, the codes below in the -.htaccess file_. Below follows the code inserted in…
-
0
votes1
answer163
viewsCreate static page PHP page with mysql query
My project has a page. php that displays lists of various product categories, the page gets the category ID and lists the products, but each ID has more than 1 thousand results, and the page loading…
-
0
votes1
answer24
viewsRedirect access to a subdomain
I have the following subdomain: http://projectos.sitecom.br. How I would make the user when typing: www.site.com.br/projects, was redirected to the given subdomain? I created inside the directory…
htaccessasked 5 years, 6 months ago user24136 -
0
votes1
answer23
viewsConflict in Archive . Htacess
On htacess: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteRule ^blog/(.*)/$ blog/assuntos.php?disciplina=$1 RewriteRule…
-
0
votes1
answer458
viewsGet $_GET value with friendly url
I have the following situation, when the URL no values after bar http://www.meusite.com/ and I type something in the search http://www.meusite.com/?s=teste includes my result page, now when the URL…
-
0
votes1
answer487
viewsRedirect everything to index.php HTACCESS
I have a website that redirects everything to index.php using htaccess using that code RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$…