Questions tagged as 'mod-rewrite'

1
answer

Apache mod_rewrite

I have a rewrite rule I found in a old question of the American OS: RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^(.*/)([^/]+)/([^/]+) $1?$2=$3&%1 [L] RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^([^/]+)/ $1.php?%1 [L] This rule...
asked by 19.10.2016 / 19:24
1
answer

URL rewriting with "+" sign (same as Google+) .htaccess

I would like to write a rule in .htaccess with RewriteRule using the plus sign (+) for a url in the format similar to Google, like this: myite.com /+anything was interpreted myite.com /?track=search or mysite.com / a site was interpret...
asked by 09.11.2015 / 22:41
1
answer

Redirect a domain to subfolder without changing the URL, but not allowing otherwise?

I have the following problem, I have an application with the following structure: app - Folder to store project files as controllers and models. public_html - Stores public documents on the web, such as index, uploads, css. routes.p...
asked by 22.11.2015 / 02:32
1
answer

Hide domain directory using htaccess or router in cakephp

I'm having a hard time creating a configuration in .htaccess to hide a folder from my site. My domain has the following structure: www.site.com.br/cake, where are the files and folders related to the project. I want to hide the / cake directo...
asked by 03.07.2015 / 15:26
1
answer

URL Friendly by title

Good evening people, I am here implementing the friendly url system on a website and I already have to work for some page, I am now blocked in the file view_establishment which is what shows the establishments in this case I have for example...
asked by 08.02.2015 / 02:28
1
answer

Not returning the second parameter

I'm developing an api. Basically it requests a page according to the request. Example: http://localhost/mod/<name>/<version> the problem is being / version. I did htaccess this way: Options +FollowSymLinks RewriteEngine on...
asked by 06.12.2016 / 16:39
1
answer

How to redirect a URL always with slash (/) in the end?

I have this code: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule . /index.php [L] </IfModule> When I type http://localhost/path I'd like it to redirect t...
asked by 14.09.2014 / 21:00
2
answers

.htaccess wildcard subdomain pointing to directory + hash

Pretty simple to doubt. Redirect by .htaccess containing a subdomain wildcard and hash. From: http://carros.domain.com/visualizar#123 http://casas.domain.com/visualizar#345 http://aps.domain.com/visualizar#567 To: http://domain.com/car...
asked by 11.12.2015 / 07:31
1
answer

How do I modify a url with .htacess? [duplicate]

I have the url example.com/photo I would like to modify it for example.com/picture Note I have access to .htacess and apache modules.     
asked by 09.02.2015 / 04:22
1
answer

.htaccess returns error 500 instead of 404

My .htaccess file seems to be ok, but if we try to access a page that does not exist, instead of getting the 404 error response, I get the 500 error response. This is the current code: RewriteEngine On # Remove o www e força o https # fun...
asked by 17.03.2017 / 16:01