[SOLVED] About problem of blank sub dirrectory.

Kenji
Posts: 6
Joined: Thu Mar 06, 2014 10:31 am

[SOLVED] About problem of blank sub dirrectory.

Post by Kenji »

Hello,rob.

I'm using WonderCMS 0.5.1 BETA now for 1 site.
Thanks for making good very small CMS.

By the way,I found 1 problem about its system.

for example,if I use http://aaa.org .
Other person can make link to http://aaa.org/aaa/ and many other sub directory easyly.

And,the CMS respond "Sorry, but aaa/ doesn't exist. :( ",if someone accessed its URL.
But search engine indexded its URL.

In fact,I found that crazy woman make hundreds links to sub directory of my site recently.
Its directory don't have contents,are blank.
But,found that Google indexed these URL.

I removed these index manually,after all.
And,improved ".htaccess" file manually.
For example,add "RedirectMatch 404 ^.*/aaa/" to file.

Its problem can reproduce in the demo site easily.

I think you should to set deny access to blank directry.
Please inform to me your idea.

Thank you.

Kenji
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: About problem of blank sub dirrectory.

Post by wiz »

Hello Kenji and welcome to the WonderCMS community.

I'm not sure I understood you correctly. Are you saying anyone can manually directories at your website? This should NOT HAPPEN at any given time.

If you're talking about Google indexing your 404 pages, this is definitely a bug and there's a fix for that!
Open your index.php file and change the code on line 50 by replacing the following if statement.

Code: Select all

				if(!isset($d['page'][$c[$key]])){
						$c['content'] = (is_loggedin())? $d['new_page']['admin']:$c['content'] = $d['new_page']['visitor'];
				}else{
					$c['content'] = $d['page'][$c[$key]];
				}
to this

Code: Select all

				if(!isset($d['page'][$c[$key]])){
						header('HTTP/1.0 404 Not Found');
						$c['content'] = (is_loggedin())? $d['new_page']['admin']:$c['content'] = $d['new_page']['visitor'];
				}else{
					$c['content'] = $d['page'][$c[$key]];
				}
As you can see, we added

Code: Select all

header('HTTP/1.0 404 Not Found');
That way, the search engine knows that the page doesn't exist and doesn't index it.

This will solve your problem permanently. If you're having problems with someone actually creating directories (and you having to delete them), there must be something terribly wrong with (either) your server, or your installation of WonderCMS.

Thank you for reporting the 404 page/Google indexing bug. This fix will be included in the next version of WonderCMS.
Kenji
Posts: 6
Joined: Thu Mar 06, 2014 10:31 am

Re: About problem of blank sub dirrectory.

Post by Kenji »

Dear,rob.

Thanks for kindness respond.

And,My problem was solved already.
Sorry for delay of reply,and poor english

Then,I will my experience for your work.

I was surprised that my site lined so many by unknown person when putting this question.

And,fixed next point.

*fixed file of .htaccess as next.
throw access from its unknown link to top page of Amazon Japan include my affiliate code.
*remove line of title on index.php,and inset title and keyword tag to each contents file.

I feel my real problem was next.

*WonderCMS display Tile at blank page.

In other words,unknown person can make link to your demo site of "http://wondercms.com/labs/051beta/aaa/" easily,and build title of "Website title - aaa:" automatically.

In fact,that was My problem.

Other site and CMS display "Nothing found for Aaa:" and "Error 404 (Not Found)!!1:" etc...,if someone access blank page.
But WonderCMS display name of directory.I think that is problem.
And,search engine indexed blank page,because WonderCMS display "aaa".

Are your understand its problem?

>header('HTTP/1.0 404 Not Found');

I don't check enough that adding this code.Sorry.
Because I fixed some problem already.
I feel that server working slowly,after try to added its code.

By the way,I'm Japanese.And, build site of Japanese language.
Please check inconvenience point for Japanese...

*Menu and description,and each contents don't display on site,in the case of use Japanese language.I don't know its reason.
*I use HTML editer and FTP client.Because Input system are inconvenience for Japanese language.

Please reply,if you need extra information.
And,my problem of this question was solved already.Thanks.

Kenji
Kenji
Posts: 6
Joined: Thu Mar 06, 2014 10:31 am

Re: About problem of blank sub dirrectory.

Post by Kenji »

Dear,rob.

>As you can see, we added
>header('HTTP/1.0 404 Not Found');
>That way, the search engine knows that the page doesn't exist and doesn't index it.

I wanted to try that solution method of above, but my server seems weak to load.
And,I don't suffer from serious problem now.

Thank you.

Kenji
Kenji
Posts: 6
Joined: Thu Mar 06, 2014 10:31 am

Re: About problem of blank sub dirrectory.

Post by Kenji »

Hi,rob.

>*remove line of title on index.php,and inset title and keyword tag to each contents file.

It includes mistake.
I removed line of title on themes.php,in fact.
Its on theme directory.thanks.

And,attached some shot of Google webmaster tool for your reference.
You can find many url have indexed by Google.But,my site include 9 contents only except top page.

Thank you.

Kenji
Attachments
links to site
links to site
shot2.jpg (36.29 KiB) Viewed 23602 times
index status
index status
shot1.jpg (32.91 KiB) Viewed 23602 times
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: About problem of blank sub dirrectory.

Post by wiz »

Hello again Kenji!

This line of code:

Code: Select all

header('HTTP/1.0 404 Not Found');
should not slow down your server, so I think it's merely a placebo effect. It just returns the header response to the search engine - it tells the search index "do not index this page". That code should also fix all of your search engine problems (except maybe for the one mentioned below, which I'm not sure I understand properly?).

This cannot slow down your server in general, because it only executes when someone (or a search engine) visits a non existing page.

I didn't understand where the mistake is (where you said in the themes.php), but I do agree on having different keywords for each page, that's great for SEO (search engine optimization).

You mean Google indexes your example.com/something and example.com/something-else but not example.com?

I think you and me are handling this language "barriers" pretty good. :)

So there is two things we need to figure out. Where exactly is this error (can you paste it here - from themes.php?) you mentioned earlier.
Google doesn't index your home page?

Thank you for your research, I'm looking forward to getting to the bottom of this.
Kenji
Posts: 6
Joined: Thu Mar 06, 2014 10:31 am

Re: About problem of blank sub dirrectory.

Post by Kenji »

Hi,rob.

Thanks for kindness supports. :)

>should not slow down your server, so I think it's merely a placebo effect.
>That code should also fix all of your search engine problems (except maybe for> the one mentioned below, which I'm not sure I understand properly?).

OK.I will try this fix.
An,will inform to you its result,after checked it.

>but I do agree on having different keywords for each page, that's great for SEO (search engine optimization).

Yes.think useful for every WonderCMS users,if the CMS provides different keywords for each page.

>You mean Google indexes your example.com/something and example.com/something-e>lse but not example.com?

For example,I have site of "http://kenko.lv9.org/".
Its my site.and,I posted this topic for the problem of its site.

Google indexes URL of "http://kenko.lv9.org/anpanmanfuku/".
But,I don't made contents of "http://kenko.lv9.org/anpanmanfuku/".

>I think you and me are handling this language "barriers" pretty good. :)

Thanks.

>Where exactly is this error (can you paste it here - from themes.php?) you mentioned earlier.

I removed line 7 and 10 from from themes.php.
And, these codes are next.

Code: Select all

<title>".$c['title']." - ".$c['page']."</title>
<meta name='keywords' content='".$c['keywords']."'>
Then,insert these title and keywords codes to each contents files directly.

>Google doesn't index your home page?

Please input "site:kenko.lv9.org" in Google search bar.
I found Google indexes 84 URL for the site,included wasted URLs.

I will post this topic again,after checked result of fix the file in this topic.

Thank you.

Kenji
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: About problem of blank sub dirrectory.

Post by wiz »

If you didn't make the contents of "http://kenko.lv9.org/anpanmanfuku" - I suggest changing your password as soon as possible. Why don't you remove this file?
Did you leave your default password "admin" for too long? I also see your "anpanmanfuku" page is a redirect to Amazon. Did you make it?

Delete any suspicious files. What CMS did you use prior to WonderCMS? Was your previous site hacked before installing WonderCMS?
You should be the only person being able to edit your web pages. Please let us know if this problem persist (some else creating pages).

Those sites being indexed by Google will be fixed with the "header('HTTP/1.0 404 Not Found');" fix.

I still didn't understand where the error was on theme.php, what error did it output or did you notice a syntax error?
Kenji
Posts: 6
Joined: Thu Mar 06, 2014 10:31 am

Re: About problem of blank sub dirrectory.

Post by Kenji »

Hello,rob.

>If you didn't make the contents of "http://kenko.lv9.org/anpanmanfuku" - I sug>gest changing your password as soon as possible. Why don't you remove this file?

I didn't make the contents of "http://kenko.lv9.org/anpanmanfuku".

>Did you leave your default password "admin" for too long?

I had changed long password already,after found the problem.
And,It have enough long.

>I also see your "anp>anmanfuku" page is a redirect to Amazon. Did you make it?

Yes.Its my fix.
Because I was thinking that these problem is caused by black SEO of other person.
However I couldn't understand correctly what happened to my site until now.

>Delete any suspicious files

These are not exist in fact.
For example,I can't find these file from FTP client soft.

>What CMS did you use prior to WonderCMS? Was your previous site hacked before >installing WonderCMS?

I am doubt server company or its agent in Japan about this problem now.
Because I know that Lv9.org are free rental server.
And,I installed WonderCMS in the first,after started to use LV9.org.

>You should be the only person being able to edit your web pages. Please let us> know if this problem persist (some else creating pages).

Yes.I am only person that edit my web page.

>I still didn't understand where the error was on theme.php, what error did it >output or did you notice a syntax error?

The problem of theme.php was caused from Japanese language mainly.
I removed line 7 and 10 from from themes.php.Because couldn't use Japanese for title,and every page use same keyword.

By the way,I have checking your proposal until now.
And,found next point,after fix work of adding code of "header('HTTP/1.0 404 Not Found');" to index.php.

*Index of Google continue to reduce.
*The code are succeeding to working that respond 404,if the page are not exist.

I think your solve method are right.
And,feel my problem was solved.

Thanks for your kindness supports.

Kenji
Attachments
URL error of Google webmaster tool.
URL error of Google webmaster tool.
URL error.jpg (44.99 KiB) Viewed 23252 times
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: About problem of blank sub dirrectory.

Post by wiz »

No problem. Marking topic as solved.
Post Reply