•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,189 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,731 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 66541 | Replies: 238
![]() |
•
•
Join Date: Apr 2005
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Dani,
Perhaps you should edit the old thread/tutorial to point to the new one, as it's definitely more complete. Having several threads that talk about the same thing (with different instructions) is confusing.
just my 0.02,
-k
•
•
•
•
Originally Posted by cscgal
This tutorial is entirely different.
Perhaps you should edit the old thread/tutorial to point to the new one, as it's definitely more complete. Having several threads that talk about the same thing (with different instructions) is confusing.
just my 0.02,
-k
•
•
Join Date: May 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I did all of these, but still got errors.
the links of the forums changed to name of the forums,( ex. site.com/announcements.html) but of course it is a 404 error :cry:
i have done the file edits.
i have edited my .htaccess exactly to what u wrote.
[PHP]RewriteEngine on
Options +FollowSymLinks
RewriteRule ^thread([0-9]+).html$ showthread.php?t=$1 [L]
RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&t=$1 [L]
RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
RewriteRule ^forum([0-9]+).html$ forumdisplay.php?f=$1 [L]
RewriteRule ^forum-one.html$ forumdisplay.php?f=1 [L]
RewriteRule ^forum-two.html$ forumdisplay.php?f=2 [L]
RewriteRule ^forum-three.html$ forumdisplay.php?f=3 [L]
...
...
...[/PHP]
where could i have an error? :o
the links of the forums changed to name of the forums,( ex. site.com/announcements.html) but of course it is a 404 error :cry:
i have done the file edits.
i have edited my .htaccess exactly to what u wrote.
[PHP]RewriteEngine on
Options +FollowSymLinks
RewriteRule ^thread([0-9]+).html$ showthread.php?t=$1 [L]
RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&t=$1 [L]
RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
RewriteRule ^forum([0-9]+).html$ forumdisplay.php?f=$1 [L]
RewriteRule ^forum-one.html$ forumdisplay.php?f=1 [L]
RewriteRule ^forum-two.html$ forumdisplay.php?f=2 [L]
RewriteRule ^forum-three.html$ forumdisplay.php?f=3 [L]
...
...
...[/PHP]
where could i have an error? :o
•
•
Join Date: Apr 2005
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
According to your htaccess, site.com/announcements.html will definitely return a 404.
Your htaccess only handle URLs like these:
[PHP]site.com/forum-one.html
site.com/forum-two.html
site.com/forum-three.html
...[/PHP]
as well as
[PHP]site.com/forum1.html
site.com/forum2.html
site.com/forum3.html
...[/PHP]
To access your forums as site.com/f4-announcements.html (for example), replace these 4 lines :
[PHP]RewriteRule ^forum([0-9]+).html$ forumdisplay.php?f=$1 [L]
RewriteRule ^forum-one.html$ forumdisplay.php?f=1 [L]
RewriteRule ^forum-two.html$ forumdisplay.php?f=2 [L]
RewriteRule ^forum-three.html$ forumdisplay.php?f=3 [L]
[/PHP]
with :
[PHP]RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?f=$1 [L][/PHP]
HTH,
-k
Your htaccess only handle URLs like these:
[PHP]site.com/forum-one.html
site.com/forum-two.html
site.com/forum-three.html
...[/PHP]
as well as
[PHP]site.com/forum1.html
site.com/forum2.html
site.com/forum3.html
...[/PHP]
To access your forums as site.com/f4-announcements.html (for example), replace these 4 lines :
[PHP]RewriteRule ^forum([0-9]+).html$ forumdisplay.php?f=$1 [L]
RewriteRule ^forum-one.html$ forumdisplay.php?f=1 [L]
RewriteRule ^forum-two.html$ forumdisplay.php?f=2 [L]
RewriteRule ^forum-three.html$ forumdisplay.php?f=3 [L]
[/PHP]
with :
[PHP]RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?f=$1 [L][/PHP]
HTH,
-k
•
•
Join Date: Apr 2005
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Look like we have an issue here.
You see, once this hack is applied, Googlebot will eventually spider each thread at least 3-4 times (url might change depending on how the hack is implemented, but the issue will remain anyway):
1. in forums, as t12345-thread-title.html
2. in archives, as threadarchive-12345.html
3. if the thread is split in several pages, the second and subsequent pages will link to the first thread as t12345-1-10.html
4. and finally as threadNext-12345.html and/or threadPrevious-12345.html
Just after implementing this hack, I went and submitted my website to google. 48h later, I noticed way more hits than I could hope for, which proves that the hack works.
BUT, after watching the indexed pages, it seems that google filtered "duplicated" pages, which is OK, but the problem is, I want google to decide that the real/original thread is t12345-thread-title.html (and not t12345-1-10.html or threadNext-12345.html), as having a title in the URL slightly boost my rank.
Proposed solution:
1. First, I went to archives and changed the "Full Thread" link to point to t12345.html, that's better, but I still need to point to t12345-thread-title.html
2. I think we should either add nofollow attribute to the original thread (ie. "1" link, in case of threads spanning several pages) or point to the original thread as t12345-thread-title.html instead of t12345-1-10.html
3. Same with threadNext/threadPrevious, either implement rel="nofollow" or use t12345-thread-title.html
Using the nofollow attribute should be avoided in this case.
Any input would be greatly appreciated. This mod looks like a cheap and fast way to increase traffic, at least in my case!
-k
You see, once this hack is applied, Googlebot will eventually spider each thread at least 3-4 times (url might change depending on how the hack is implemented, but the issue will remain anyway):
1. in forums, as t12345-thread-title.html
2. in archives, as threadarchive-12345.html
3. if the thread is split in several pages, the second and subsequent pages will link to the first thread as t12345-1-10.html
4. and finally as threadNext-12345.html and/or threadPrevious-12345.html
Just after implementing this hack, I went and submitted my website to google. 48h later, I noticed way more hits than I could hope for, which proves that the hack works.
BUT, after watching the indexed pages, it seems that google filtered "duplicated" pages, which is OK, but the problem is, I want google to decide that the real/original thread is t12345-thread-title.html (and not t12345-1-10.html or threadNext-12345.html), as having a title in the URL slightly boost my rank.
Proposed solution:
1. First, I went to archives and changed the "Full Thread" link to point to t12345.html, that's better, but I still need to point to t12345-thread-title.html
2. I think we should either add nofollow attribute to the original thread (ie. "1" link, in case of threads spanning several pages) or point to the original thread as t12345-thread-title.html instead of t12345-1-10.html
3. Same with threadNext/threadPrevious, either implement rel="nofollow" or use t12345-thread-title.html
Using the nofollow attribute should be avoided in this case.
Any input would be greatly appreciated. This mod looks like a cheap and fast way to increase traffic, at least in my case!
-k
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,879
Reputation:
Rep Power: 32
Solved Threads: 106
SEO Report, I appreciate your suggestions. However, they are unrelated to this vB mod_rewrite tutorial. Instead, they are related to the newer one which has multipage support and such. In the future, please reply to the appropriate thread.
Everyone, you can find the thread that SEO Report is talking about here: http://www.daniweb.com/techtalkforums/thread22840.html
Everyone, you can find the thread that SEO Report is talking about here: http://www.daniweb.com/techtalkforums/thread22840.html
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,879
Reputation:
Rep Power: 32
Solved Threads: 106
I'm confused what you mean.
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
- [Revised] vBulletin Mod_rewrite Tutorial (PHP)
- vBulletin mod_rewrite for vB 3.0.7 (Existing Scripts)
- vBulletin mod_rewrite for vB 3.0.7 (Growing an Online Community)
- vBulletin mod_rewrite in phpBB mod format (Existing Scripts)
Other Threads in the PHP Forum
- Previous Thread: Help Needed
- Next Thread: mysql_num_rows warning




Linear Mode