• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Отображение URL адресов страниц без слэша в конце
PostPosted: Thu Nov 09, 2017 6:50 am 
Offline
New Member
New Member

Joined: Thu Apr 06, 2017 6:03 pm
Posts: 4
Здравствуйте! Суть вопроса такова:

Есть страница http://site.com/page1

Вводим в строке браузера - http://site.com/page1, результат http://site.com/page1

Вводим в строке браузера - http://site.com/page1/, результат http://site.com/page1/

Прописываем в .htaccess:
RewriteCond %{REQUEST_URI} /$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*)/$ http://site.com/$1 [R=301,L]

Вводим в строке браузера - http://site.com/page1, результат http://site.com/page1

Вводим в строке браузера - http://site.com/page1/, результат http://site.com/index.php?page=page1/

Хотел убрать во всех url-ах сайта конечный слэш. В чем я не прав? правило взял с этого же форума. Версия CMS 2.1.6


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting