Search…

X3 Photo Gallery Support Forums

Search…
 
bhajduk
Topic Author
Posts: 2
Joined: 29 Feb 2020, 08:55

SEO and redirection 301

02 Mar 2020, 04:26

Hi there :)

I got a problem with the 301 redirection.
Woorank find this on my website :
Image

It can't find the 301 redirection.

I got this on the .htaccess :
<IfModule mod_rewrite.c>

# RewriteEngine enabled
RewriteEngine on

# RewriteBase (required for some hosts)
# If X3 is installed in root: RewriteBase /
# If X3 is installed in sub-directory x3:  RewriteBase /x3
# RewriteBase /

# Rewrite any calls to html|json|xml|atom|rss if a folder matching * exists
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.+)\.(html|json|xml|atom|rss)$ index.php?$1/ [L]

# Rewrite any calls to /render to the X3 image resizer
RewriteCond %{REQUEST_URI} render/
#RewriteRule ^render/. app/parsers/slir/ [L]
RewriteRule ^render/. app/parsers/slir/index.php?$1 [L]

# Rewrite routes to X3 application index.php if they are non-existent files/dirs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ index.php?/$1/ [L,QSA]
#RewriteRule ^(.*)$ index.php?/$1 [L,QSA]


</IfModule>

I don't know what to change so that the redirection works and is recognized by woorank !?
If someone can help me plz ?

Best regards
Bastien
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: SEO and redirection 301

02 Mar 2020, 09:22

bhajduk wrote:I got a problem with the 301 redirection.
Woorank find this on my website :
Image

It can't find the 301 redirection.
It's a bit hard to understand the question, because I can't read that screenshot, and I can't translate it through Google either. Basically, you want ALL your website combinations (http://, http://www, https:// and https://www) all consolidated and redirected to the SAME url? That would be the correct thing to do from a SEO perspective, and is how we do it at our photo.gallery domain ... http://photo.gallery, http://www.photo.gallery and https://photo.gallery will all consolidate and redirect to https://www.photo.gallery.
bhajduk wrote:I got this on the .htaccess :
<IfModule mod_rewrite.c>
From what I can see, that is just the default X3 .htaccess code, without any custom redirects. X3 will NOT by default redirect your urls between http, https, www (or non-www). This is a choice and responsibility for each website owner, independently from the X3 app. Some websites don't even have https, while other websites only use www. Often you can setup these redirects from your hosting control panel.

If you want to add a custom rule to redirect all to a SINGLE url, you would need to figure out what url you would go for. If you want to redirect all url's to https://hajdukbastien.fr, you are looking for "Apache redirect www to non-www and HTTP to HTTPS". There is an example here of the custom rule you would have to add the your .htaccess file:
https://simonecarletti.com/blog/2016/08 ... ww-apache/

Perhaps easier would be to use X3's own FORCE URL setting (Settings > Advanced > Force URL). If you set the value to "https://hajdukbastien.fr", all requests would redirect to that url if they come from non-https or with www.
 
bhajduk
Topic Author
Posts: 2
Joined: 29 Feb 2020, 08:55

Re: SEO and redirection 301

02 Mar 2020, 12:04

mjau-mjau wrote:From what I can see, that is just the default X3 .htaccess code, without any custom redirects. X3 will NOT by default redirect your urls between http, https, www (or non-www). This is a choice and responsibility for each website owner, independently from the X3 app. Some websites don't even have https, while other websites only use www. Often you can setup these redirects from your hosting control panel.

If you want to add a custom rule to redirect all to a SINGLE url, you would need to figure out what url you would go for. If you want to redirect all url's to https://hajdukbastien.fr, you are looking for "Apache redirect www to non-www and HTTP to HTTPS". There is an example here of the custom rule you would have to add the your .htaccess file:
https://simonecarletti.com/blog/2016/08 ... ww-apache/
I tried this. But i can't do anything working with my website !?
mjau-mjau wrote:
Perhaps easier would be to use X3's own FORCE URL setting (Settings > Advanced > Force URL). If you set the value to "https://hajdukbastien.fr", all requests would redirect to that url if they come from non-https or with www.
OH THANKS !!!! i didn't understood this setting was for this... 
It works perfectly !!!
thank you very much :)