phpでURLを取得し、自動でリンクを貼るプログラムを作っていたのですが、その際に自動で生成されるリンクが以下のようになり、正常に表示されません。
http://www.example.org/site/<wbr>testtest/php.html
<wbr>というのは、長いURLや長い英数字の羅列をホームページに記載すると文字列が改行されずテーブルやボックスが延々横長に表示されるのを防ぐためのタグ。
…
.htaccessに以下を記述してルートに設置
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
RewriteBase /
# Rewrite URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
参考:http://eru-net.jp/web/?itemid=58
graffiti on the web
この投稿へのコメント
コメントはまだありません。