Forum Moderators: phranque

Message Too Old, No Replies

phpbb2 posts into html pages mod rewrite

         

benevolent001

7:37 pm on Jan 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



phpbb2 posts into html pages

any apache mod rewrite htaccess code for this i have forum in sub folder

domain/forum

thanks

any apache mod rewrite htaccess code for this i have forum in sub folder

domain/forum

thanks

benevolent001

7:41 pm on Jan 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i have got this code for subdomain.domain.com but this is not valid for forum in subfolder

like domain/forum can you make up something from this....

php_flag register_globals off
php_flag display_errors off
RewriteEngine on

Options All -Indexes
# deny most common except .php
<FilesMatch "\.(inc¦tpl¦h¦ihtml¦sql¦ini¦conf¦class¦bin¦spd¦theme¦module)$">
deny from all
</FilesMatch>

<Limit GET PUT POST>
Order Allow,Deny
Allow from all
</Limit>

#Forums
RewriteRule ^ftopic-([0-9]*)-([0-9]*)-days([0-9]*)-order(desc¦asc)-([A-Za-z0-9_-]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L]
RewriteRule ^ftopic-([0-9]*)-days([0-9]*)-order(desc¦asc)-([0-9]*).html viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L]
RewriteRule ^ftopic-([0-9]*)-([0-9]*).html viewtopic.php?t=$1&start=$2 [L]
RewriteRule ^ftopic-([0-9]*)-(previous¦next).html viewtopic.php?t=$1&view=$2 [L]
RewriteRule ^ftopic(t¦p)-([0-9]*)-([A-Za-z0-9_-]*).html viewtopic.php?$1=$2&highlight=$3 [L]
RewriteRule ^ftopic-([0-9]*)-(watch¦unwatch)-([0-9]*).html viewtopic.php?t=$1&$2=topic&start=$3 [L]
RewriteRule ^ftopic(t¦p)-([0-9]*).html viewtopic.php?$1=$2 [L]
RewriteRule ^ftopic(t¦p)-([0-9]*).html#([0-9]*) viewtopic.php?$1=$2#$3 [L]
RewriteRule ^forum-editprofile.html profile.php?mode=editprofile [L]
RewriteRule ^forum-userprofile-([0-9]*).html profile.php?mode=viewprofile&u=$1 [L]
RewriteRule ^forum-register-new.html profile&mode=register.php?agreed=true [L]
RewriteRule ^forum-register-coppa.html profile&mode=register.php?agreed=true&coppa=true [L]
RewriteRule ^forum-register.html profile&mode=register.php [L]
RewriteRule ^forums-posting.html posting.php [L]
RewriteRule ^forum-faq-bbcode.html faq.php?mode=bbcode [L]
RewriteRule ^topic-post-([0-9]*).html posting.php?t=$1 [L]
RewriteRule ^topic-vote-([0-9]*).html posting.php?mode=vote&t=$1 [L]
RewriteRule ^topic-new-([0-9]*).html posting.php?mode=newtopic&f=$1 [L]
RewriteRule ^topic-reply-([0-9]*).html posting.php?mode=reply&t=$1 [L]
RewriteRule ^topic-view-([0-9]*).html viewtopic.php?t=$1 [L]
RewriteRule ^topic-edit-([0-9]*).html posting.php?mode=editpost&p=$1 [L]
RewriteRule ^topic-smilies.html posting.php?mode=smilies&popup=1 [L]
RewriteRule ^topic-quote-([0-9]*).html posting.php?mode=quote&p=$1 [L]
RewriteRule ^forum-posting.html posting.php [L]
RewriteRule ^forums-group([0-9]*).html groupcp.php?g=$1 [L]
RewriteRule ^search-author-([a-zA-Z0-9_-]*).html search.php?&search_author=$1 [L]
RewriteRule ^search-([0-9]*)-([0-9]*).html search.php?search_id=$1&start=$2 [L]
RewriteRule ^search-(unanswered¦egosearch¦newposts).html search.php?search_id=$1 [L]
RewriteRule ^search-results.html search.php?mode=results [L]
RewriteRule ^forums-([^index][a-zA-Z0-9_-]*).html $1 [L]
RewriteRule ^forum-c([0-9]*).html index.php?c=$1 [L]
RewriteRule ^forum-mark.html index.php?&mark=forums [L]
RewriteRule ^forums.html index.php [L]
RewriteRule ^forum-viewonline.html viewonline.php [L]
RewriteRule ^forum-([0-9]*)-days([0-9]*)-([0-9]*).html viewforum.php?f=$1&topicdays=$2&start=$3 [L]
RewriteRule ^forum-([0-9]*)-([0-9]*).html viewforum.php?f=$1&start=$2 [L]
RewriteRule ^forum-([0-9]*)-mark.html viewforum.php?f=$1&mark=topics [L]
RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L]
RewriteRule ^forums.html index.php [L]

matimer

8:09 pm on Jan 3, 2005 (gmt 0)

10+ Year Member



So if i copy everything you just wrote it will switch my *.php files in my forum to *.html If the site is setup domain.com/forum

Thanks for clearifying

Matt

jdMorgan

9:33 pm on Jan 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> i have got this code for subdomain.domain.com but this is not valid for forum in subfolder

Move that code into an .htaccess file in the subfolder.
-or-
Add the name of your subfolder to the rewriterule patterns.

Example from your first rule:


RewriteRule ^[b]forum/[/b]ftopic-([0-9]*)-([0-9]*)-days([0-9]*)-order(desc¦asc)-([A-Za-z0-9_-]*)\.html

I have a lot to do today. I will be moderating, but not posting much.

Jim

benevolent001

8:01 am on Jan 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ok Jim i shall be waiting for your reply tommorow ...i dont want to anything wrong which will mess my board...so i hope you will be guiding me first then i will be doing anything further..

i shall be waiting for your reply
Thanks a lot

benevolent001

8:55 am on Jan 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



public_html/forum/.htaccess: Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration

i get this error when i place htaccess file in the subfolder /forum

benevolent001

6:34 pm on Jan 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Reminder Mr. Jim

Here is the recap...i have forum in /forum directory and i have placed the following code in the .htaccess file which is placed in forum directory itself...the problem is that whenever we click any forum say in index page we have three forums and we click on any one ...the link would be like this
forum-1.html but would return back to the index page...whats is wrong with this

Thanks in advance

RewriteEngine On 
RewriteRule ^forum.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) post-.html$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* post-.html$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* about.html$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) about.html$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest about.html$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* about.html$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* about.html$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* about.html$1 [L,NC]
RewriteRule ^about([0-9]*).html about.html$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^mark-forum([0-9]*).html* forum-.html$1&mark=topics [L,NC]
RewriteRule ^updates-topic([0-9]*).html* about.html$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* about.html$1&unwatch=topic [L,NC]
RewriteRule ^forum-([0-9]*).html forum-.html$1 [L,NC]
RewriteRule ^forum-([0-9]*).* forum-.html$1 [L,NC]
RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* forum-.html$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^ptopic([0-9]*).* about.html$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* about.html$1&view=next [L,NC]

benevolent001

6:40 pm on Jan 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Jim
sorry for bothering you
Its working now