Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
348 views
in Q2A Core by
Hello,
I am struggling for some time to solve the redirect chain that WordPress is making and I didn't find yet any solutions.
here is my htaccess:

 <IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} off

RewriteRule ^(.*)$https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_USER_AGENT} ^(.+)$
RewriteCond %{SERVER_NAME} ^example\.com$
RewriteCond %{SERVER_NAME} ^www\.example\.com$
RewriteRule .*https://%{SERVER_NAME}%{example} [R=301,L]
Header add Strict-Transport-Security "max-age=300"
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

For now makes the redirect chain:
http://www.example.com/dir/product/
301 Moved Permanently
https://www.example.com/dir/product/
301 Moved Permanently
https://www.example.com/product/
200 OK

The idea is to pass those redirect chains and if you could help me out I would really appreciate

The idea is to redirect dir to dir/ dir to product and product to product without a redirect chain

Kind regards

Please log in or register to answer this question.

...