Mod_rewrite help !?

  • Jetlag
  • Newbie
  • Newbie
  • Jetlag
  • Posts: 12
  • Loc: Vancouver, Canada

Post 3+ Months Ago

I was looking at the .htacces code on the first page...
Code: [ Select ]
.htaccess (Should be in forum root)

#
#-----[ ADD ]------------------------------------------


RewriteEngine On
RewriteRule ^forums.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) sutra.html$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* sutra.html$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* ftopic.html$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) ftopic.html$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest ftopic.html$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* ftopic.html$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* ftopic.html$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* ftopic.html$1 [L,NC]
RewriteRule ^about([0-9]*).html ftopic.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* ftopic.html$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* ftopic.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]*).* ftopic.html$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* ftopic.html$1&view=next [L,NC]
  1. .htaccess (Should be in forum root)
  2. #
  3. #-----[ ADD ]------------------------------------------
  4. RewriteEngine On
  5. RewriteRule ^forums.* index.php [L,NC]
  6. RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) sutra.html$1&highlight=$2 [L,NC]
  7. RewriteRule ^post-([0-9]*).* sutra.html$1 [L,NC]
  8. RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* ftopic.html$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
  9. RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) ftopic.html$1&highlight=$2 [L,NC]
  10. RewriteRule ^about([0-9]*).html&view=newest ftopic.html$1&view=newest [L,NC]
  11. RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* ftopic.html$1&postdays=$2&postorder=$3&start=$4 [L,NC]
  12. RewriteRule ^about([0-9]*)-([0-9]*).* ftopic.html$1&start=$2 [L,NC]
  13. RewriteRule ^about([0-9]*).* ftopic.html$1 [L,NC]
  14. RewriteRule ^about([0-9]*).html ftopic.html$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
  15. RewriteRule ^mark-forum([0-9]*).html* forum.html$1&mark=topics [L,NC]
  16. RewriteRule ^updates-topic([0-9]*).html* ftopic.html$1&watch=topic [L,NC]
  17. RewriteRule ^stop-updates-topic([0-9]*).html* ftopic.html$1&unwatch=topic [L,NC]
  18. RewriteRule ^forum-([0-9]*).html forum.html$1 [L,NC]
  19. RewriteRule ^forum-([0-9]*).* forum.html$1 [L,NC]
  20. RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* forum.html$1&topicdays=$2&start=$3 [L,NC]
  21. RewriteRule ^ptopic([0-9]*).* ftopic.html$1&view=previous [L,NC]
  22. RewriteRule ^ntopic([0-9]*).* ftopic.html$1&view=next [L,NC]

Dont use whats posted here... when you post the code it will rewrite the php to html
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Daniel
  • Student
  • Student
  • Daniel
  • Posts: 91

Post 3+ Months Ago

whats wrong with .html?
  • Jetlag
  • Newbie
  • Newbie
  • Jetlag
  • Posts: 12
  • Loc: Vancouver, Canada

Post 3+ Months Ago

Quote:
whats wrong with .html?

If you look at able2know code and whats showing in this topic ...they are different.
example ...last two lines in able2know code but i used "dot"php because this forum will rewrite it.

PHP Code: [ Select ]
RewriteRule ^ptopic([0-9]*).* viewtopicdotphp?t=$1&view=previous [L,NC]
 
RewriteRule ^ntopic([0-9]*).* viewtopicdotphp?t=$1&view=next [L,NC]
 
 
  1. RewriteRule ^ptopic([0-9]*).* viewtopicdotphp?t=$1&view=previous [L,NC]
  2.  
  3. RewriteRule ^ntopic([0-9]*).* viewtopicdotphp?t=$1&view=next [L,NC]
  4.  
  5.  


but in this ozzu topic they have...
PHP Code: [ Select ]
RewriteRule ^ptopic([0-9]*).* ftopic.html$1&view=previous [L,NC]
 
RewriteRule ^ntopic([0-9]*).* ftopic.html$1&view=next [L,NC]
  1. RewriteRule ^ptopic([0-9]*).* ftopic.html$1&view=previous [L,NC]
  2.  
  3. RewriteRule ^ntopic([0-9]*).* ftopic.html$1&view=next [L,NC]
  • Daniel
  • Student
  • Student
  • Daniel
  • Posts: 91

Post 3+ Months Ago

hmm does any1 want to do this for me in return for some hosting or adversting?
  • djtheropy
  • Graduate
  • Graduate
  • djtheropy
  • Posts: 111

Post 3+ Months Ago

well thats the code i use on my forum and it works fine and hasnt given me no problem and about rewritting it to html thats the whole goddam point of it .

Have you even used mod_rewrite on a phpbb forum before?
  • Jetlag
  • Newbie
  • Newbie
  • Jetlag
  • Posts: 12
  • Loc: Vancouver, Canada

Post 3+ Months Ago

Quote:
well thats the code i use on my forum and it works fine and hasnt given me no problem and about rewritting it to html thats the whole goddam point of it .

I installed it also... but what im tring to say is whats posted in here is wrong. I dont see the correct code (able2know) posted in this topic. Maybe IE 6 rewrites parts of the code to html because this forum uses rewrite. I see "RewriteRule ^ntopic([0-9]*).* ftopic.html$1&view=next [L,NC]" when it should be "RewriteRule ^ntopic([0-9]*).* viewtopicdotphp?t=$1&view=next [L,NC]" (i had to use "dot" so it will not rewrite it)
  • Daniel
  • Student
  • Student
  • Daniel
  • Posts: 91

Post 3+ Months Ago

no djtheropy I haven't. I have just been trying to do it with some 'test forums' yet to no avail, most of the time I do it, it works but when you click the links to /forum1.html it goes to a 404....So could you do it for me ?
  • Daniel
  • Student
  • Student
  • Daniel
  • Posts: 91

Post 3+ Months Ago

so can any1 do this for me in exchange for something?
  • madmonk
  • Mastermind
  • Mastermind
  • madmonk
  • Posts: 2115
  • Loc: australia

Post 3+ Months Ago

hi pm me yr email add and i will send u a copy of my htccess. you can prolly figure out the rest. :-)
  • Daniel
  • Student
  • Student
  • Daniel
  • Posts: 91

Post 3+ Months Ago

Well can some1 atually do the whole thing as I am really new to this lol

Post Information

  • Total Posts in this topic: 40 posts
  • Users browsing this forum: No registered users and 10 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.