L
L
lexstile2017-06-14 12:06:20
CMS
lexstile, 2017-06-14 12:06:20

How to set up a redirect to cms arwshop.ru?

It is necessary that from pages with product cards, for example, from
site.ru/tesnii-put.html there should be a redirect to www.site.ru/tesnii-put.html
(at the moment it turns out to www.site.ru/index.php? prname=tesnii-put
htaccess:
#Options -Indexes
DirectoryIndex index.php index.html index.htm
RewriteEngine on
RewriteBase /
RewriteRule ^product([0-9]{1,10})\.html$ index.php?product= $1 [L]
RewriteRule ^cat([0-9]{1,10})/$index.php?cat=$1 [L]
RewriteRule ^cat([0-9]{1,10})/pg([ 0-9]{1,10})\.html$ index.php?cat=$1&pg=$2 [L]
RewriteRule ^news/pg([0-9]{1,10})\.html$ index. php?view=news&pg=$1 [L]
RewriteRule ^news/([0-9a-zA-Z\x80-\xFF\x20\_\-]{1,255})\.html$ index.php?view=news&newsname =$1[L]
RewriteRule ^news/$ index.php?view=news [L]
RewriteRule ^content/pg([0-9]{1,10})\.html$ index.php?view=content&pg=$1 [L]
RewriteRule ^ content/([0-9a-zA-Z\x80-\xFF\x20\_\-]{1,255})\.html$ index.php?view=content&pname=$1 [L]
RewriteRule ^content/$ index. php?view=content [L]
RewriteRule ^agreement\.html$ index.php?view=agreement [L]
RewriteRule ^delivery_methods/$ index.php?view=delivery_methods [L]
RewriteRule ^delivery_methods/dm([0-9 ]{1,10})\.html$ index.php?view=delivery_methods&dm=$1 [L]
RewriteRule ^pay_methods/$ index.php?view=pay_methods [L]
RewriteRule ^pay_methods/pm([0-9]{ 1,10})\.html$ index.php?view=pay_methods&pm=$1 [L]
RewriteRule ^manufacturers/([0-9a-zA-Z\x80-\xFF\x20\/\_\-]{1,255})/pg([0-9]{1,10})\.html$ index .php?view=manufacturers&mnfname=$1&pg=$2 [L]
RewriteRule ^manufacturers/pg([0-9]{1,10})\.html$ index.php?view=manufacturers&pg=$1 [L]
RewriteRule ^manufacturers /([0-9a-zA-Z\x80-\xFF\x20\/\_\-]{1,255})/$index.php?view=manufacturers&mnfname=$1 [L]
RewriteRule ^manufacturers/$index.php ?view=manufacturers [L]
RewriteRule ^discounts/$ index.php?view=discounts [L]
RewriteRule ^discounts/group\.html$ index.php?view=discounts&dtype=group [L]
RewriteRule ^product_comments/([0 -9a-zA-Z\x80-\xFF\x20\_\-]{1,255})/pg([0-9]{1,10})\.html$ index.php?prname=$1⊂=product_comments&pg =$2[L]
RewriteRule ^product_comments([0-9]{1,10})/pg([0-9]{1,10})\.html$ index.php?product=$1⊂=product_comments&pg=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([0-9a-zA-Z\x80-\xFF\x20\_\-]{1,255})\.html$ index.php?prname=$1 [L]
RewriteRule ^([0-9a-zA-Z\x80-\xFF\x20\/\_\-]{1,255})/pg([0-9]{1,10})\.html$ index.php?fcat=$1&pg=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([0-9a-zA-Z\x80-\xFF\x20\/\_\-]{1,255})/([0-9a-zA-Z\x80-\xFF\x20\_\-]{1,255})\.html$ index.php?fcat=$1&prname=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9a-zA-Z\x80-\xFF\x20\/\_\-]{1,255})/$ index.php?fcat=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9a-zA-Z\x80-\xFF\x20\/\_\-]{0,255})([0-9a-zA-Z\x80-\xFF\x20\_\-] {1,1})$ $1$2/ [R=301,L]
RewriteCond %{HTTP_HOST} ^site\.ru$ [NC]
RewriteRule ^(.*)$ www.site.ru/$1 [R=301, L]
RewriteCond %{HTTP_HOST} ^site\.ru$ [NC]
RewriteCond %{REQUEST_URI} !^/robots.*
RewriteRule ^(.*)$ https://www.site.ru/$1 [R=301, L]
Redirect 301 /market/ www.site.ru
Redirect 301 /3/ www.site.ru/pravoslavnie-molitvoslovi
---------------
Most redirects are standard. I remove - nothing works.
Remove this line:
RewriteRule ^([0-9a-zA-Z\x80-\xFF\x20\_\-]{1,255})\.html$ index.php?prname=$1 [L]
The current urls stop working.

Answer the question

In order to leave comments, you need to log in

1 answer(s)

and with what fright they should work?
You have a get parameter in the steering wheel, which is not part of the url in principle.
What do you want from him?
Here is happiness for you
https://www.donatstudios.com/RewriteRule_Generator
Then just substitute your masks.
by the way {1,255}, you can safely replace it with {1,}- which means from one and above
But [0-9a-zA-Z\x80-\xFF\x20\/\_\]as I understand it, you can reduce it to+

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question