I
I
Ilya Korolev2019-01-05 01:24:54
htaccess
Ilya Korolev, 2019-01-05 01:24:54

How to setup htaccess redirect?

Hello, I have an opencard engine with a dynamic url.
I can not force to show in any way that that is necessary to me namely.
url/?route=common/home
url/index.php?route=error/not_found
url/?route=product/special
url/index.php?route=product/product&product_id=210
url/index.php?route=product/ category&path=25
Were friendly like
url
url/not_found
url/special
url/product_id/210
http://url/category/(here is the category name SEOURL)/26
Tried everything

RewriteEngine on
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.+)/(.+)/(.+)/(.+)/(.+)\.html$ /index\.php\?route=$1(*=)$2/(*/)$3&path=$4&product_id=$5&%{QUERY_STRING} [L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.+)/(.+)/(.+)/(.+)\.html$ /index\.php\?route=$1(*=)$2/(*/)$3&path=$4&%{QUERY_STRING} [L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.+)/(.+)/(.+)\.html$ /index\.php\?route=$1(*=)$2/(*/)$3&%{QUERY_STRING} [L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.+)\.html$ /index\.php\?route=$1&%{QUERY_STRING} [L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^([^/]+)\.html$ /index\.php\?route=$1&%{QUERY_STRING} [L]

so
RewriteEngine On
RewriteBase /
#RewriteRule ^(.*+)/(.*+)/(.*+)/$ ^route=(.*)$1/(.*)$2\&(path=[.*]+)$3&%{QUERY_STRING} [QSA,L]
#RewriteRule ^(.*+)/(.*+)/$ ^route=(.*)$1/(.*)$2&%{QUERY_STRING} [QSA,L]
#RewriteRule ^(.*+)/$ ^route=(.*)$1&%{QUERY_STRING} [QSA,L]

but so far only managed to remove ?route=common/home on 1 page on the main
RewriteEngine On
RewriteBase /
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

in general, the problem with uri and I can not understand what.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question