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
votes0
answers54
views.htacess redirects to wrong url
I had deploying the user-friendly url in a project to test, so I decided to deploy in TCC, but something is happening that I can’t detect what it is. When I upload the site in / he opens the…
-
1
votes1
answer38
viewsRedirect 301 by htaccess
I need to do some 301 redirects of urls of my website that has changed and is in Ubdomain, how do I make these changes in htaccess? Before my site accessed: www.meusite.com.br/contact Now it looks…
-
1
votes1
answer187
viewsSet directory to subdomain via HTACCESS
I created a sub-domain and would like its directory to be a specific folder. For example: Sub-domain: test.site.com.br Briefcase: website/folder/ Here’s what I tried: RewriteCond %{HTTP_HOST}…
-
1
votes1
answer69
viewsDo browsers cache the . htaccess file?
I wrote a regular expression to make the site always redirect to the HTTPS protocol. However, it is not possible to use HTTPS in localhost. To gain access, I turned the lines responsible for the…
-
1
votes0
answers134
viewsInternal redirect URL friendly
I am creating a page with image gallery with database, and when clicking an image, is redirected to the page profile.php with the image data, as if it were a profile. I want to make my URL more…
-
1
votes1
answer1927
viewsHTTP redirect to HTTPS with LARAVEL
Good afternoon devs, I’m having trouble rerouting HTTP to HTTPS, I have the following content in my . HTACCESS # Redireciona para o HTTPS independente do domínio RewriteCond %{HTTPS} off RewriteRule…
-
1
votes1
answer68
viewsURL with fixed and variable parameter
Hello, I’m having trouble getting my htaccess file right, and I have a fixed parameter that I pass manually and one that depends on the user when I click and change Uf, follow the example…
-
1
votes1
answer69
viewsRedirected from the domain
I have a Locaweb domain that redirects to my vps ip via A and CNAME. It redirects the normal link mainly however when and typed link with http:// without www and also if http:// it is redirected to…
-
1
votes1
answer369
viewsObject not found when clicking on hyperlink
Hello, I am learning IC and I came across the following problem. By clicking a link in a home test, I would like to be transferred to another page and use another controller, but by clicking, I get…
-
1
votes3
answers364
viewsHow to overwrite a root HTACCESS in a subfolder with another HTACCESS
I have a file HTACCESS at the root of my project. However, I have a subfolder that also has a file HTACCESS. But I’m not sure how to make this code override part of the HTACCESS root. HTACCESS root:…
-
1
votes1
answer34
viewsAdd HTTPS to a website that isn’t at the root
I have a site that he is not at the root, when entering it he adds/portal in front of the link because it is divided into folders inside the root, when accessing the /portal he goes to the index of…
-
1
votes2
answers50
viewshow to deny direct access to index.php and index.php/
Hello, I’m making use of the url friendly, which is working very well, however I want to prohibit access to the archive index.php and index.php/, I want when accessing them to be redirected to the…
-
1
votes3
answers144
viewsforce ssl with htaccess and angular7
Well I have a website hosted at UOL, and I’m going through a strange problem. The structure of the site is so: | index.html | .htaccess | |app1 | | .htaccess | |index.html | |app2 | | .htaccess |…
-
1
votes1
answer36
viewsRedirecting via htacess
Guys, how do I redirect a site http://www.meuSite.com.br for https://meuSite.com.br using the .htacess. On the provider I am he created a . htacess this way #DO NOT REMOVE THIS LINE AND THE LINES…
htaccessasked 5 years, 10 months ago user135751 -
1
votes1
answer25
viewsTo create an exception in htaccess mod_expires
I have a website that I use mod_expires to cache, but I didn’t want to apply to all pages, because the home page, for example, is dynamic, changes every day. There is how I create an exception rule…
-
1
votes0
answers20
viewshtaccess does not work
already enabled htaccess in my Apache and even though gave error 500, someone can tell me if the problem is in the code? RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond…
-
1
votes0
answers17
viewsRedirectmatch is triggering another rule in . htacces triggering unwanted behavior
I’m trying to make the following redirect https://www.example.com/alguns-diretorios-diferentes/0-todas-pr for https://www.example.com/alguns-diretorios-diferentes/0-todas-as-cidades-pr I added the…
-
1
votes0
answers56
viewsHow do I make URL Friendly + 301 Redirect with . htaccess?
I have a site with thousands of pages with no URL friendly, so I want to put this feature.. My site currently looks like this: https://www.meusite.com.br/? pag=videos I want him like this:…
-
1
votes0
answers145
views -
1
votes1
answer49
viewsHow to create url’s friendly with . htaccess pointing to a different path from where the referenced file is?
I have a question regarding making the URL friendly for a site, I believe the title is not very clear, but would be the following: I am doing a maintenance on an old site in PHP, it was written so…
-
1
votes1
answer24
viewsMerging of . htaccess
I’m trying to understand a little about the file . htaccess but I can’t merge two rules. This is the one I use for the slim framework. RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php…
-
1
votes1
answer671
viewsPrevent direct access to wordpress videos (Prevent direct access files)
I own a wordpress-based Learning application, and I have several video lessons in the directory public_html/wp-content/uploads/... I would like to prevent direct access to these videos, since it is…
-
1
votes0
answers80
viewsRedirecting the root URL to a directory . htaccess
I have the following domain: https://aulasprofdanilo.com.br When accessing it it is possible to observe that it directs to the following screen (see below): In order to access my teaching platform,…
-
1
votes1
answer74
viewsHow do I use Redirectmatch to redirect to the other page?
I have an application made in wordpress and I’m making a new one with HTML/CSS and PHP. Inside the folder of this application made in wordpress, has a file called htaccesss, and has the following…
-
1
votes0
answers56
viewsredirect all air requests to index.php and take the value passed by the URL
I need to redirect all requests to index.php so that you can insert the . php file corresponding to the url into the body. Example when accessing the www.dominio.com.br/forgot password click on the…
-
1
votes0
answers24
viewsProblem: User-friendly URL on . htacess modifying the Index
As I explained in the post: /questions/491299/passar-p%C3%a1gina-via-get-e-manipulating-a-url-via-htacess I have a structure of pages: 1-Index 2-Product 3-Detail (of products) The 'Product' page is…
-
1
votes0
answers48
viewsPass page via $_GET and manipulating the URL via . htacess
I have a page in PHP that shows the products in general (products.php): <?php include_once("conexao.php"); $query = "SELECT * FROM produtos"; $result_query = mysqli_query($conn, $query); ?>…
-
1
votes0
answers17
viewsRedirect from port 443 to another
Guys, see if you can help me, I’ve already looked it up, and I can’t find anything on this. The following I have 2 domains configured for a site in Laravel 7 so far ok. I have configured htaccess as…
htaccessasked 3 years, 9 months ago Joao Nivaldo 1,229 -
0
votes1
answer6399
views.htaccess to URL friendly
How do I make rules Mod_Rewrite (htaccess) for my pages? I’m not used to .htaccess Rules I would like: www.exemplo.com/index.php for www.exemplo.com www.exemplo.com/perfil.php for…
-
0
votes0
answers61
viewsPermantent redirection (301) to addresses without WWW with htaccess
How do I have all addresses that have "https://" redirected to the same address but without the www*? Ex: https://www.meudominio.com/teste redirects to https://meudominio.com/test obs. ONLY HTTPS…
-
0
votes1
answer677
viewsError with controller in codeigniter named system.php
I’m working on a project that’s in Codeigniter. There is a controller called system.php that is to access the admin, only when I try to access it that way localhost/meusite/system/método, it gives…
-
0
votes1
answer2188
viewsInternal Server Error with . htaccess Linux Mint file
I’m getting an HTTP 500 error Internal Server Error on linux Mint, Apache server. Server version: Apache/2.4.7 (Ubuntu) / Server built: Apr 3 2014 12:20:28 file . htaccess RewriteEngine On…
-
0
votes3
answers259
viewsFix SRC Urls by HTACCESS
I am using URL friendly via HTACCESS and because I am using it the pages lose the Styles and js. Because the path (URL) is done as ex /category/pizza so it looks for src="category/pizza/style.css" .…
-
0
votes1
answer217
viewsCakephp problems with . htaccess
I made the publication of the project, ran correctly, however, the other projects that were at the root stopped working, I checked and from what I noticed the problem is in . htaccess, which is so…
-
0
votes1
answer901
viewsSetting controller paths in Codeigniter directories
I have many controllers in my project, with this I divide the controllers into folders, website in the site folder, admin in the admin folder (within controllers). But I can’t access the controllers…
-
0
votes1
answer79
viewsReformulating URL in htacess
I am trying to rephrase the url that causes you to change the page. I have the following URL www.site.com/categoria.php?cat=Humor&page=3 The way above quotes the pagination works perfectly. But…
-
0
votes0
answers821
viewsIgnore Friendly URL for certain folders in . HTACCESS
A big problem has arisen with a customer I have, he needs to have two stores (using Open Cart) in the same domain, only both are different products, layout and plug-ins (so I can not make two…
-
0
votes1
answer87
viewsWhen accessing a *.php lead to Autostart.php? url=*. php
Hello, I have a problem, I need you to access any file .php, he directs to autostart.php?url=*.php Explanation: In the autostart.php it da include in a file and after it gives include in the page…
-
0
votes1
answer429
views.htaccess URL friendly PHP problem
I have a link like this: <a href="index/pagina=$i"> $i </a> wanted the URL to look like this: index/2 and I’m using the .htaccess thus: <IfModule mod_rewrite.c> RewriteEngine On…
-
0
votes1
answer345
viewsUrl rewriting does not work on https
I have the following problem: Dude. htaccess defines my URL rewriting that works perfectly when accessed by http but when accessed by https it informs that the page has not been found. Below is my .…
-
0
votes1
answer170
viewsUrl Friendly . htaccess problem
I have the following file . htaccess: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d ErrorDocument 404 /erro404 RewriteRule ^(.*)$ index.php?rota=$1 [L,QSA]…
-
0
votes0
answers52
viewsWordpress changing URL when accessing links
I have a domain www.dominio.com.br that points to my server and is redirected via .htaccess for the sub-folder www.dominio.com.br/novo through the following code: RewriteEngine on RewriteCond…
-
0
votes0
answers44
viewsRedirect error
On a client server you have a project in Cakephp, I created a folder called halldafama at the server root. I need to access this folder, only when trying to access me returns: Error: The requested…
-
0
votes1
answer77
viewsRouter in Zend 1.12 hide controller and action
Hi, I want to make sure the user does not see my controller or the action in ZF 1.12. Ex: http://meusite.com/produtos/listar/item/iphone-5s-preto I want you to stay like this:…
-
0
votes1
answer82
viewshtaccess rules for searches
I am using the following htaccess code: <IfModule mod_rewrite.c> RewriteEngine on # Include in the next line all folders to exclude RewriteCond %{REQUEST_URI} !(app/view/*|web/*) [NC]…
-
0
votes0
answers113
viewsRedirect site with . htacess
I need to use friendly urls and am trying to make an adjustment with . htacess I have a url: http://www.site.com.br/default.asp?id=meuid&acao=minhaacao&hint=minhahint I need her to stay that…
-
0
votes0
answers102
viewsMod_rewrite in Cakephp
I need to change all the URL’s of a website once it’s done. The current URL is in the following structure: www.meudominio.com.br/website/ And I would like it to be removed from all the internal…
-
0
votes1
answer123
viewsGet Querystring and redirect with . htaccess
I would like to get the querystring URL : url.htm and direct with htaccess. I’m about to make it: RewriteRule ^([A-Za-z-]+)\.htm$ conteudo.php?url=$1&%{QUERY_STRING} [qsappend] RewriteRule…
-
0
votes1
answer118
viewsRedirect site with . htaccess
Good Afternoon! I want to make a redirect on my website and am not finding the solution. I want when the guy accesses by ip for example: https://1.2.3.4 he directs to https://site name It is…
-
0
votes1
answer101
viewsHow to redirect all urls from a subdomain to a specific url?
How can I do this with .htaccess? All pages of http://axi.axitech.com.br/ should be directed to the page http://axi.axitech.com.br/lojas-virtuais