Search…

X3 Photo Gallery Support Forums

Search…
 
winph
Experienced
Topic Author
Posts: 236
Joined: 19 Jul 2008, 05:07

Index of Content

19 Aug 2016, 19:42

Hi,

I noticed that Google have index a page of mine but with Index of Content (www.domainname.com/content/1.photos) instead of www.domainname.com/photos. Is there anyway that when people check the Index of Content it will redirect to the proper page?

sorry i can't post the exact link or page. i can PM it to you if you like.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13999
Joined: 30 Sep 2006, 03:37

Re: Index of Content

20 Aug 2016, 00:48

winph wrote:I noticed that Google have index a page of mine but with Index of Content (http://www.domainname.com/content/1.photos)
And does that page actually work? It definitely should not, in which case it should not get indexed either. Also, normally, this would have to be linked from somewhere for Google to find it ... Google works in mysterious ways though.

For example, if you try to link the physical path of a folder, you should get "forbidden", not something that Google indexes:
https://mjau-mjau.com/content/2.blog/3.preload-website/
(from https://mjau-mjau.com/blog/preload-website/)

If you have a link PM, yes it would be interesting to check.


For redirect, since the page gets intercepted to "forbidden" by server, as it should, we cannot redirect it from the X3 script. You can redirect with the .htaccess file, but I won't try to make a common rule for something that should be happen.

You could do something like this:
Code
Redirect 301 /content/1.photos  http://www.domainname.com/photos
 
winph
Experienced
Topic Author
Posts: 236
Joined: 19 Jul 2008, 05:07

Re: Index of Content

20 Aug 2016, 20:49

here... i can see index.
http://sherwintan.com/content/private/Kinder-G/
if you try to search sherwintan + Kinder-G this will show up

i didnt change anything in  .htaccess file
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13999
Joined: 30 Sep 2006, 03:37

Re: Index of Content

21 Aug 2016, 02:47

winph wrote:here... i can see index.
http://sherwintan.com/content/private/Kinder-G/
Your HOST should have directory listing disabled by default. We can't do this from the X3 application.

You can fix this by adding the following line to your .htaccess file:
Code
Options -Indexes
 
winph
Experienced
Topic Author
Posts: 236
Joined: 19 Jul 2008, 05:07

Re: Index of Content

21 Aug 2016, 17:28

mjau-mjau wrote:
winph wrote:here... i can see index.
http://sherwintan.com/content/private/Kinder-G/
Your HOST should have directory listing disabled by default. We can't do this from the X3 application.

You can fix this by adding the following line to your .htaccess file:
Code
Options -Indexes
thanks 
Code
Options -Indexes
fixed the problem. btw i'm using the .htaccess files from included from the download.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13999
Joined: 30 Sep 2006, 03:37

Re: Index of Content

22 Aug 2016, 01:15

winph wrote:
Code
Options -Indexes
fixed the problem. btw i'm using the .htaccess file included from the download.
We try to minimize the amount of subjective rules in the .htaccess file, but admittedly, this rule should perhaps be active by default, to make sure folder content is not listed.