2
I’d like to ride a URL
user-friendly with generic parameters, ie that receive any parameter in any quantity or file.
Today I rode the .htaccess
so that the file name becomes the URL
. File I am using:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?)$ $1.php
Options -Indexes
ErrorDocument 404 /erro.php
</IfModule>
Example of URL
who would like:
site.com.br/filename/parametro-01/parametro-02/parametro-03/...
In case anyone knows how to ride, it would be very helpful.
Moises, take a look at this answer and see if this is what you wish: http://answall.com/a/75970/8493
– KaduAmaral
@Kaduamaral There is no direct form in the
.htaccess
? Need to treat in thePHP
even?– MoisesGama
Yes @Moisesgama, htaccess itself is not for programming, it’s just a configuration file. You need to handle in PHP, which I don’t see any downside.
– KaduAmaral