We know that WordPress is most famous blog in the world, and the default link for is using /archives and /category.

But this make problems to those sites that are not using WordPress, like my site is using .

Most of the search engine in the world will search for
example.com/archives/…
example.com/category/…

sometimes search for
example.com//…
example.com//…


Many big site will use cache to store the sites that requested by user, and search engine too. So, something wrote appear to my Phpwind site.

It appear
http://forums.perak.org/cn/index.php/archives/images/m/simple/simple/attachment/mini/ae64b982c3.jpg
Sometimes appear
http://forums.perak.org/cn/index.php/category/…

Here is the temporarily solutions for Phpwind, from version 7.3.2 to version 8. If you enable cache.

Edit the file
global.php

put in the code on line 2, after the < ?

$block_uri[0] = 'archives';
$block_uri[1] = 'category';
foreach ($block_uri as $uri) {
if (strpos($_SERVER['REQUEST_URI'], $uri)) {
header('Location: http://forums.perak.org/cn/');
exit;
}
}

Now, all the request to

http://forums.perak.org/cn/index.php/archives/…

http://forums.perak.org/cn/index.php/category/…

Will redirect to http://forums.perak.org/cn/
So, now you just delete all the cache, clean up, then regenerate the cache, all the wrong path won’t be appear anymore.

Update (2010/09/12)

I modified into this to run better.

<?php

$block_uri[0] = 'index.php/';

foreach ($block_uri as $uri) {

if (strpos($_SERVER['REQUEST_URI'], $uri)) {

header('Location: http://forums.perak.org/cn/');

exit;

}

}



You may add to your index.php.

But I added in global.php

Some people search for:

  • sharing is caring wp
  • problem link /index php/archives/ wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Dreamhost Coupon Code

Optimized by SEO Ultimate