Topic: Mod-rewrite
I would like to have Search Engine friendly url's, does someone now what lines I should put in my htaccess to get url's like:
http://pun.site.com/forum/1
http://pun.site.com/topic/1
Thans in advance
You are not logged in. Please login or register.
PunBB Forums → General discussion → Mod-rewrite
I would like to have Search Engine friendly url's, does someone now what lines I should put in my htaccess to get url's like:
http://pun.site.com/forum/1
http://pun.site.com/topic/1
Thans in advance
I would also like to know, and I'm too lazy to check it out myself :D
mod_rewrite is famous for its incredible lack of useful, human-readable documentation.
Hi guys, I 've just finished mod_rewriting PunBB, although it is not he way you want : I 've chosen to rewrite "viewforum-1.html" instead of viewforum.php?id=1 for example.
If you want to see it in action go to http://www.babouk.net/forums/ (it is still under construction but i don't think you'll care)
If you have mod_rewrite activated here's the code to put in your .htaccess
--------------------------------------------------------------------
RewriteEngine on
RewriteRule ^viewforum-([0-9]+)\.html$ /punbb/viewforum.php?id=$1[L]
RewriteRule ^viewtopic-([0-9]+)\.html$ /punbb/viewtopic.php?id=$1[L]
RewriteRule ^viewtopicp-([0-9]+)\.html$ /punbb/viewtopic.php?pid=$1[L]
RewriteRule ^profile-([0-9]+)\.html$ /punbb/profile.php?id=$1[L]
---------------------------------------------------------------------
Of couse "punbb" is the name of the directory you've installed Punbb in.
Beware bas use of mod_rewrite can crash the server, As soon as I can I 'll post a tutorial.
That's fantastic Eric ! My url's were just for illustration. Thanks a lot.
How do you do the change of table colour on mouse-over?
What do I have to do to punBB to get it to output the search engine friendly URLs inside the script?
Was bored, thought "stuff it", here it is:
http://punres.cactuz.nu/?p=projects/desc&id=25
Please don't tell me how bad the code is, i'm tired and I really don't care at the moment.
After finishing it I have decided that punBB is not the board for me, and that I will be writing my own forum software.
Hi,
i would like to change my forum ngine friendly too, but all answers dowsnt work for me ...
Have anybody a good mod for this problem ...?
Thanks a lot...
Michaela
your forum IS search engine frinedly contrary to popular belief PunBB can be indexed by search engines, there is no need for urls like that (although they look pretty neat)
its not working for me.. and mod_rewrite its enable..
hubabuba, I guess you have "AllowOverride None"
so .htaccess cant make any "override" changes to configurable stuff.
its working
but..
i have: /forum/viewforum-9.html
and /forum/viewforum.php?id=9
how can i lose ..php?id=9
thx
and btw
in this case: forum/viewtopic.php?id=24&p=2 what rules i should put ?
/punbb/viewtopic.php?pid=$1[L] will not work..
PunBB Forums → General discussion → Mod-rewrite
Powered by PunBB, supported by Informer Technologies, Inc.