Are the second language should be redirect as 301?

General questions regarding the use of languages in Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
User avatar
Chacapamac
Joomla! Ace
Joomla! Ace
Posts: 1069
Joined: Wed Feb 20, 2008 6:50 am
Location: Canada, Montreal
Contact:

Are the second language should be redirect as 301?

Post by Chacapamac » Tue May 17, 2022 1:42 pm

Got a French first language and english website (switch on Browser language)

My second language appear as 302 redirect in Google, I don’t think it’s right?


I Use Akeeba Admintools to create my htaccess and the only 301 is for the http to https

##### RewriteEngine enabled - BEGIN
RewriteEngine On
##### RewriteEngine enabled - END

##### RewriteBase set - BEGIN
RewriteBase /
##### RewriteBase set - END

##### HTTP to HTTPS redirection
## Since you have enabled HSTS the first redirection rule will instruct the browser to visit the HTTPS version of your
## site. This prevents unsafe redirections through HTTP.
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule .* https://mywebsite.com%{REQUEST_URI} [L,R=301]



##### Redirect index.php to / -- BEGIN
RewriteCond %{THE_REQUEST} !^POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ / [R,L]
##### Redirect index.php to / -- END
##### Rewrite rules to block out some common exploits -- BEGIN
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_(en|de)code\(.*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F]

Not sure what to do here?
Can God help us?
Marketing, SEO, Web development - Powered by Joomla!
http://www.grafcomm.ca/

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 28943
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Are the second language should be redirect as 301?

Post by Per Yngve Berg » Tue May 17, 2022 3:00 pm

You don't need any redirects for https in .htaccesd. Set Force https Entire Site in Global Configuration.

User avatar
Chacapamac
Joomla! Ace
Joomla! Ace
Posts: 1069
Joined: Wed Feb 20, 2008 6:50 am
Location: Canada, Montreal
Contact:

Re: Are the second language should be redirect as 301?

Post by Chacapamac » Wed May 18, 2022 11:24 am

Per Yngve Berg wrote:
Tue May 17, 2022 3:00 pm
You don't need any redirects for https in .htaccesd. Set Force https Entire Site in Global Configuration.
Thanks!

What about the second language appearing as 302 redirect in Google, I don’t think it’s right?
Can God help us?
Marketing, SEO, Web development - Powered by Joomla!
http://www.grafcomm.ca/


Post Reply

Return to “Language - Joomla! 3.x”