La redirection .htaccess ne fonctionne pas. Ci-dessous mon fichier .htaccess actuel des idées?
Options -Indexes
DirectoryIndex index.php
Options +FollowSymlinks
RewriteEngine on
RewriteBase /mu
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} !^www. [NC]
Redirect 301 ^/Bilet.php$ https://www.sitename.com.tr/mu
Redirect 301 ^/SSS.html$ https://www.sitename.com.tr/mu/sss
Redirect 301 ^/ik.php$ https://www.sitename.com.tr/mu/kurumsal/insan-kaynaklari
Réponses:
1 pour la réponse № 1C’est le bon fichier .htaccess pour la redirection 301 avec la redirection forcée https.
Veuillez préciser si vous utilisez un cadre quelconque
# Turn on URL rewriting
RewriteEngine On
# Installation directory
#RewriteBase /mu
RewriteCond %{THE_REQUEST} /index.php [NC]
RewriteRule ^(.*?)index.php[^/] /$1? [L,R=301,NC,NE]
RewriteCond %{THE_REQUEST} /index.php [NC]
RewriteRule ^(.*?)index.php(?:/(.*))?$ /$1$2? [L,R=301,NC,NE]
RewriteCond %{THE_REQUEST} /index.php [NC]
RewriteRule ^(.*)index.php$ /$1/ [R=301,L,NC,NE]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteCond %{HTTP_HOST} ^(?!localhost$|127.0.0.1$)(?:www.)?(.+)$ [NC]
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L,NE]
Redirect 301 /Bilet.php /mu
Redirect 301 /SSS.php /mu/sss
Redirect 301 /ik.php /mu/kurumsal/insan-kaynaklari