Questions tagged as 'htaccess'

1
answer

Add bar at end of URL with Htaccess

I'm having a problem with my .htaccess , since I previously used .htm at the end now that I want to by bar I can not change. Usage with .htm query string : ##### Url Dinamica ################################### <ifMo...
asked by 24.10.2015 / 21:38
2
answers

Organize site by folders in directory

I'm venturing into my first website written in PHP and there's something bothering me, which is the way the site URL is, for example: meusite.com/index.php?page=ucp&p=edit&id=58 The URL gets huge, I'd like to know the best way to or...
asked by 23.05.2016 / 05:12
1
answer

Friendly Url in PHP and Sql

I have the following php code to make my site urls friendly: <?php $atual = (isset($_GET['pg'])) ? $_GET['pg'] : 'home'; $permissao = array('home', 'contato', 'sobre', 'politica'); $pasta = 'arquivos'; if (substr_count($atual, '/') &g...
asked by 01.02.2015 / 03:46
2
answers

What is [QSA] for and similar in RewriteRule?

I have as an example the following RewriteRule ^(Home)?/?$ page/php/Home.php [NC,L] I know that NC is Non-Case(Não diferencia maiúsculas e minusculas) . L means that if a RewriteRule is true it stops checking....
asked by 08.10.2014 / 14:31
2
answers

Block direct access to a directory and create condition to free access with .htacess

I have this for when: Request is not an existing file OR Request ends with .php RewriteCond %{REQUEST_FILENAME} !-f [OR] RewriteCond %{REQUEST_FILENAME} \.php$ RewriteRule ^(.*)$ http://login/sites/?request=$1 [L] I do not understand...
asked by 04.03.2015 / 16:41
1
answer

Laravel 5 - Remove public from URL

I've developed a form and need to "play" it on the production server . I do not have any type of server access (Linux, Slackware). I access my application through the link url. With the script below I get only the message Sorry, the page y...
asked by 10.04.2015 / 16:07
3
answers

Problems with regular expressions (friendly url)

I'm having trouble reading a product's code from a friendly URL. With the regular expression that I put, it is accepting all the characters that are in front of the product code, that is, typing produto/9789/quantidade/5 it understands...
asked by 23.12.2014 / 13:46
1
answer

How to clear a 301 redirect that has already been stored in the browser cache?

To get easy to understand the problem, I will call the site that had the redirection of "A" and the destination of "B" A 301 (rather than 302) redirect was made from site A to site B without any expiration date, since the server was not sendi...
asked by 06.10.2017 / 02:14
1
answer

How does RewriteBase work in .htaccess?

I've always used .htaccess to url's amigáveis no php , but recently when I moved to the server of a company X, the .htaccess that always worked did not work on that server .... After searching, I discovered that just putting R...
asked by 23.09.2014 / 22:07
1
answer

503 Forwarding on multiple URLs except for one

How to make a redirect 503 (maintenance code) on every site, but leave only one URL that can be accessed? Server: Linux (Apache) with PHP 5.5 and MySQL.     
asked by 15.04.2014 / 18:38