PDA

Просмотр полной версии : Открытие Ibf портала в корне сайта


MadRomas
30.10.2006, 08:08
Приветствую!
Сразу перейду к делу.

Форум у меня лежит в директории /forum: http://example.com/forum/
IBF Портал соответственно расположен по ссылке: http://example.com/forum/index.php?act=portal


Дак вот, в корне моего сайта лежит пустой index.php. Какой PHP скрипт мне надо туда написать, чтоб когда кто либо заходил в корень сайта, открывался портал?

НЕ РЕДИРЕКТ, а копирывал бы вывод портального PHP скрипта в индех сайта.

Надеюсь обьяснил понятно. Спасибо вам за помошь.

k1b0rg
30.10.2006, 10:19
mod rewrite

MadRomas
30.10.2006, 19:28
Есть у меня один mod_rewrite. Но там про index и портал не прописано. Вот его содержимое:

.htaccess
RewriteEngine on

# Topics
RewriteRule ^topic([^-]*)$ index.php?showtopic=$1&%{query_string}
RewriteRule ^topic_([^-]*)$ index.php?showtopic=$1&%{query_string}

# Forums
RewriteRule ^forum([^-]*)$ index.php?showforum=$1&%{query_string}
RewriteRule ^forum_([^-]*)$ index.php?showforum=$1&%{query_string}

# Users
RewriteRule ^user([^-]*)$ index.php?showuser=$1&%{query_string}
RewriteRule ^user_([^-]*)$ index.php?showuser=$1&%{query_string}

# Other Stuff
RewriteRule ^login(.*)$ index.php?act=Login&CODE=00&%{query_string}
RewriteRule ^help(.*)$ index.php?act=Help&%{query_string}
RewriteRule ^search(.*)$ index.php?act=Search&%{query_string}
RewriteRule ^members(.*)$ index.php?act=Members&%{query_string}
RewriteRule ^calendar(.*)$ index.php?act=Calendar&%{query_string}
RewriteRule ^logout(.*)$ index.php?act=Login&CODE=03&%{query_string}

# Might as well deny access to certain things whilst we're at it
# not essential, but just helps fix people who carelessly leave .txt
# and junk around. You get a real 403, not IPB's silly 403 page.
#
# Comment next line to disable.
RewriteRule archive_in/|archive_out/|sources/|lang/|modules/|Skin/|ssi_templates/ index.php [F]

blackybr
30.10.2006, 20:21
что-то типа...
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule (.*) http://example.com/forum/index.php?act=portal/$1 [R]
</IfModule>

2MadRomas это совсем не то.. это замена ссылки с

http://example.org/index.php?showforum=2
на
http://example.org/forum2.html (например)

MadRomas
31.10.2006, 00:34
2MadRomas это совсем не то
Ну процесс почти одинаковый.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule (.*) http://example.com/forum/index.php?act=portal/$1 [R]
</IfModule>
так он меня редирект посылает.