S
S
Sergey Manko2016-08-21 22:31:19
htaccess
Sergey Manko, 2016-08-21 22:31:19

How to compose a RewriteRule correctly?

There is a page with the results of the issue when searching by tag.
The link to it is as follows: http://opencart/search/?tag=hello
And you need to get this: http://opencart/hello
Maybe someone knows the solution.
At the moment my .htaccess looks like this:
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [ L,QSA]
RewriteRule ^([a-zA-Z0-9_-]+)$ search/?tag=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ search/?tag=$1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
web-mechanic, 2016-09-01
@serikamanco

cms will "think" http://opencart/hello is a category

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question