我有一个页面，如example.com/abcd.php?ull=efg，apache aliasing它到example.com/product/ef。我不希望在此页面上可见某些块;当我在块部分使用产品/ efg时，它不会效果。我想知道如何走这个问题。
I have a page like example.com/abcd.php?url=efg with Apache aliasing it to example.com/product/efg. I don't want certain blocks to be visible on this page; when I use product/efg in the block section, it does not take any effect. I wanted to know how to go about this issue.
If example.com/product/efg is a path alias, then you need to use the path that uses that alias in the block visibility settings.
For example, if example.com/product/efg is the alias for example.com/node/1, then you need to add node/1 in the list of pages where the block should not be shown.
If you have more path aliases for the same internal URL, then instead of setting the pages where the block should not be shown, you need to use PHP code that returns
TRUE when the block needs to be shown. Code similar to the following one should work:
<?php return request_uri() != '/product/efg'; ?>
If Drupal is executed in a subdirectory of the web server root directory, e.g. dr6, the code needs to be modified as follows:
<?php return request_uri() != '/dr61/product/efg'; ?>
The reason I didn't use drupal_get_path_alias() is that the function returns just one of the path aliases existing for the internal path passed as argument; in the case there are more path aliases, this would be a problem.