0

Guys i have that link:

http://kika-makeup.dev.extensa.bg/index.php?route=information/information

how to become to that link:

http://kika-makeup.dev.extensa.bg/information

I tried with this one:

RewriteEngine on
RewriteRule ^/information/([0-9]+)$ /index.php?route=information/information

1 Answers1

0

Here's why your regex won't match:

RewriteRule ^/information/([0-9]+)$ /index.php?route=information/information
             ↑               ↑
   leading slash          There's no numbers in your
  does not match          shortened input path.
    in .htaccess          »http://example/information«

And since you gave no further details, this is just a sample about how to internally rewrite your one input path:

RewriteRule ^(information)$ index.php?route=information/$1

For more examples on how to match things, see Reference: mod_rewrite, URL rewriting and "pretty links" explained

mario
  • 138,064
  • 18
  • 223
  • 277
  • It doesn't work, i tried with this code: RewriteBase /kika_makeup/ RewriteCond %{QUERY_STRING} ^route=(information/information)$ RewriteRule ^(information)$ /index.php?route=information/$1 –  Nov 02 '17 at 10:16
  • This looks like you're attempting something else entirely. Not answerable without context and RewriteLog. – mario Nov 02 '17 at 18:47