Jump to content
  • 0

Как поправить htaccess?


haidamaka
 Share

Question

От прошлых обладателей сайта достался косяк, .htaccess блокирует запрос

POST http://site.com.ua/c...ent/jcomments/. Происходит 301 Редирект. Как правильно поправить чтобы нормально проходил запрос? Подскажите, плиз.

Текущий код htaccess


RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^GET\ .*/index\.(php|html)\ HTTP
RewriteRule ^(.*)index\.(php|html)$ /$1 [R=301,L,QSA]

RewriteRule ^((.*)\.html)/(.*)?$ /$1 [R=301,L]

RewriteCond %{REQUEST_URI} !^[\/]?kabinet
RewriteCond %{REQUEST_URI} (.*)\.htm$
RewriteRule (.+) %1.html [R=301,L]

RewriteCond %{REQUEST_URI} !^[\/]?kabinet
RewriteCond %{REQUEST_URI} (.*[^/])[/]?$
RewriteCond %{REQUEST_URI} !(.*)\.[\w]*$
RewriteCond %{REQUEST_URI} !^/administrator
RewriteRule (.+) %1.html? [R=301,L]

Заранее спасибо.

Edited by haidamaka
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Хотя стоп, я не обратил внимания на начальную ссылку, а только на конечную ))))

У вас редиректит на адрес _http://www.nulled.cc/redirect/?url=http://site.com.ua/component/jcomments/ ?

Если так то как сказал rus на сайте nulled.cc вас и редиректит на site.com.ua

Edited by wwt
Link to comment
Share on other sites

  • 0

Сори, поправил. Редирект идёт внутренний. Суть вообще создать исключение именно для этого запроса который ведет на компонент комментариев joomla.

Проблема в том, что в joomla закрыли дубли страниц(закрыли страницы, заканчивающиеся на слэш ) и при введении такого адреса происходит редирект на страницу с ,html в конце.

Здесь нужно добавить исключение именно для этого запроса.

Edited by haidamaka
Link to comment
Share on other sites

  • 0

попробуйте так


RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^GET\ .*/index\.(php|html)\ HTTP
RewriteRule ^(.*)index\.(php|html)$ /$1 [R=301,L,QSA]

RewriteRule ^((.*)\.html)/(.*)?$ /$1 [R=301,L]

RewriteCond %{REQUEST_URI} !^[\/]?kabinet
RewriteCond %{REQUEST_URI} (.*)\.htm$
RewriteRule (.+) %1.html [R=301,L]

RewriteCond %{THE_REQUEST} !^POST\ /component/jcomments/\ HTTP.*
RewriteCond %{REQUEST_URI} !^[\/]?kabinet
RewriteCond %{REQUEST_URI} (.*[^/])[/]?$
RewriteCond %{REQUEST_URI} !(.*)\.[\w]*$
RewriteCond %{REQUEST_URI} !^/administrator
RewriteRule (.+) %1.html? [R=301,L]

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy