I use .htaccess to clear my url. It works great when you click on various links, for example, www.example.com/el-nino-effect. However, when I go directly to www.example.com, it takes me to www.example.com/index?iden=, and not just to www.example.com. Although this is the same page, this primary URL is somehow wrapped. You can help?
The fourth point is where the clean URL is present in .htaccess, but I still host the whole file. Also funny, this problem does not occur in the Chrome browser on Ubuntu, but occurs in the Chrome browser on chroma.
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]
RewriteRule ^([^/\.]+)?$ index.php?iden=$1 [L]
RewriteRule ^([^/\.]+)/?$ index.php?iden=$1 [L]
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
source
share