خرید بک لینک

Vote count: 0

I'm using the htaccess file for my multi-language site to redirect people to SEO-friendly URL's. It works perfectly on my production server, but unfortunately not on my development server (localhost).

This is my code so far (source):

RewriteEngine On
RewriteBase /   

# empty url -> redirect to en/
RewriteCond %{QUERY_STRING} !lang=(en|de|nl)
RewriteRule ^$ en/ [R=301,L]

# url is ONLY '/en' or '/de' -> redirect to /en/ or /de/ (adding slash)
RewriteRule ^(en|de)$  $1/ [R=301,L]

# now all urls have en/ de/ -> parse them
RewriteRule ^(en|de|nl)/(.*)$  $2?lang=$1&%{query_STRING} [L]

How to make it work on localhost too? I think it has something to do with the Basepath?

asked 3 mins ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 30 فروردين 1395 ساعت: 5:15

صفحه بندی