NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Mod Rewrite

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 09-25-2008, 03:40 PM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Jul 2007
Posts: 56
Slash95 is an unknown quantity at this point
 



Mod Rewrite


Hey guys, came accross a small problem.

I have set up my phpBB forum with mod rewrite, all works fine, apart from, whenever i go to,
http://myforum.url/forum_name/
it redirects fine, but then changes the url back to
http://myforum.ul/viewforum.php?f=4

Is there any way to keep this page as the /forum_name/ instead of viewforum.php?f=4

Any help would be much appreciated
Slash95 is offline  
Old 09-30-2008, 01:14 AM   #2 (permalink)
NamePros Member
 
jabba_29's Avatar
Join Date: Mar 2007
Location: Finland
Posts: 29
jabba_29 is an unknown quantity at this point
 



Can you show your rewrite rule -
you need to have [L] in there somewhere, but easier to comment if you
post the relevant rewrite snippet.
__________________
Regards Jamie

Let the might of your compassion arise to bring a quick end
to the flowing stream of the blood and tears .....
Please hear my anguished words of truth.
jabba_29 is offline  
Old 09-30-2008, 04:34 AM   #3 (permalink)
NamePros Regular
 
useless's Avatar
Join Date: Sep 2008
Location: India
Posts: 360
useless has a spectacular aura aboutuseless has a spectacular aura about
 



is it just with this page or more ?
useless is offline  
Old 10-01-2008, 05:33 AM THREAD STARTER               #4 (permalink)
NamePros Member
Join Date: Jul 2007
Posts: 56
Slash95 is an unknown quantity at this point
 



Code:
# FORUM INDEX
    RewriteRule ^forum\.html$ /bbs/index.php [QSA,L,NC]
    # FORUM
    RewriteRule ^[a-z0-9_-]*-f([0-9]+)/?(page([0-9]+)\.html)?$ /bbs/viewforum.php?f=$1&start=$3 [QSA,L,NC]
    # TOPIC WITH VIRTUAL FOLDER
    RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /bbs/viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
    # GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
    RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /bbs/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
    # TOPIC WITHOUT FORUM ID & DELIM
    RewriteRule ^([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /bbs/viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
    # PROFILES ADVANCED
    RewriteRule ^[a-z0-9_-]*-u([0-9]+)/$ /bbs/memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
    # USER MESSAGES ADVANCED
    RewriteRule ^[a-z0-9_-]*-u([0-9]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /bbs/search.php?author_id=$1&sr=$2&start=$4 [QSA,L,NC]
    # GROUPS ADVANCED
    RewriteRule ^[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /bbs/memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
    # POST
    RewriteRule ^post([0-9]+)\.html$ /bbs/viewtopic.php?p=$1 [QSA,L,NC]
    # ACTIVE TOPICS
    RewriteRule ^active-topics(-([0-9]+))?\.html$ /bbs/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
    # UNANSWERED TOPICS
    RewriteRule ^unanswered(-([0-9]+))?\.html$ /bbs/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
    # NEW POSTS
    RewriteRule ^newposts(-([0-9]+))?\.html$ /bbs/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
    # THE TEAM
    RewriteRule ^the-team\.html$ /bbs/memberlist.php?mode=leaders [QSA,L,NC]
    # HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

    # FORUM WITHOUT ID & DELIM
    # THESE THREE LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /bbs/viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
    # END PHPBB PAGES

????: NamePros.com http://www.namepros.com/programming/517919-mod-rewrite.html
Thats the code I have so far. seems to have the [L] tags already.

Any other ideas?

thanks
Slash95 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:28 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger