Questions tagged as '.htaccess'

0
answers

Custom 404 error. It does not work

Hello a few days ago I changed the hosting server and the 404 error page customized on the old server worked perfectly, with these two files in the root directory of the domain, error404. html and in it .htaccess with this line: ErrorDocument 40...
asked by 09.09.2018 / 09:48
0
answers

Problem building friendly urls with .htaccess on page made with react-js when navigating with https protocol

I have a site that uses mod_rewrite to make the url friendly, when requesting a page for http protocol if I take the rules that I have in the .htaccess, but if I make a request for https, it does not take them well my .htaccess would b...
asked by 14.08.2018 / 19:03
2
answers

PHP redirect to change session variable

I have to perform on a site, a functionality that allows that when you enter after the url, a / + currency, change the selected currency. The coins are set in a PHP session variable, so I thought about doing a htaccess redirect to a URL with...
asked by 31.07.2018 / 22:30
0
answers

Redirect css folder with htaccess

I am redirecting several folders with .htaccess, including the css folder with all project styles. When I add this folder to the redirect, the project does not recognize all the styles (404 error appears) This is the folder with all the files...
asked by 19.07.2018 / 18:25
0
answers

Configure server for REST with php

I have the following doubt, I created an api rest with php, locally it works great, but when I upload it to the server the drivers are not available. The problem is not the route, since a controller is looked for by default of the framework and...
asked by 05.07.2018 / 22:11
1
answer

Delete a file in PHP using your .htaccess alias

I have a htaccess tag, it renames and gives hello name to the v.php file, leaving: www.example.com/hola So, I want to delete this " v.php ", by its name hello (written by htaccess) $e = __DIR__ . "/hola"; $result = unlink($...
asked by 09.07.2018 / 00:14
0
answers

Regular expressions URL .htaccess

I'm trying to generate URLs to be somewhat more SEO-friendly. My regular expression is this: Rewriterule ^carta(\w+)/(.+)/([0-9]+)/(.+)$ /pages/carta.php?id_menu=$1&nombre=$2 Currently the URLs are displayed like this: localhost/pages...
asked by 29.06.2018 / 14:19
0
answers

Error 500 problem with .htaccess

I have a problem with my .htaccess file When I have uploaded my application to a hosting of 1 & 1 it returns an error 500, I have tried to comment all the lines of the file and it stops giving the error. RewriteEngine On RewriteRule ^...
asked by 21.06.2018 / 16:11
0
answers

My .htaccess does not redirect to my friendly url

I'm trying a redirect for a friendly url: RewriteRule ^productos Productos.php [NC,L] when I write midireccion.com/productos it works but when I write midireccion.com/Productos.php it does not redirect me it continues writing...
asked by 22.06.2018 / 02:05
2
answers

Prevent the subdomain from being redirected to the main domain

I have created a subdomain es.domain.es but when I enter it in the address bar it takes me to dominio.es My .htaccess file is: RewriteEngine On RewriteBase / RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://dominio.es/$1 [R=301,...
asked by 14.06.2018 / 11:24