1

Please help me, i am new in this stuff.

I have a little issue with rewrite rule, i test my website with this rule in xammp server and it work very good, meaning that i want to have my URL like this http://ridingwolf.com/en/transylvania-food-and-culture-guided-tour instead http://ridingwolf.com/en/transylvania-food-and-culture-guided-tour.html.

But after i upload files on a shared server that run LiteSpeed is not working and every time when i access this link http://ridingwolf.com/en/transylvania-food-and-culture-guided-tour redirects me to 404!

I don't know what to do!

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
RewriteRule ^([^/]+)/$ $1.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]

Thank you in advance.

  • Answer from binaryfunt works with your url :-) Tested it with: http://htaccess.mwl.be/ – Edwin Nov 16 '17 at 12:41
  • I checked locally on xammp and the code is working, but the link that you gave me it gime me an erro code, http://htaccess.mwl.be?share=f9137296-5d11-58f5-9b64-eed04b08949d – tudora adrian Nov 16 '17 at 13:14
  • I don't see any errors? And if I exclude your snippet the rule itself is working. :-) http://htaccess.mwl.be?share=26f92bdb-45ca-5f2b-ad84-c9d4bad12923 – Edwin Nov 16 '17 at 13:16

0 Answers0