<?xml version="1.0" encoding="utf-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Search Engine Optimization (SEO) for phpBB URLs</title>
	<link>http://www.derekscruggs.com/search-engine-optimization-seo-for-phpbb-urls.html</link>
	<description>Answering questions about entrepreneurship,  internet marketing, PHP/MySQL and doing business with China. (How's that for diversity?)</description>
	<pubDate>Thu, 20 Nov 2008 16:39:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Derek Scruggs</title>
		<link>http://www.derekscruggs.com/search-engine-optimization-seo-for-phpbb-urls.html#comment-309</link>
		<pubDate>Thu, 11 Aug 2005 05:57:04 +0000</pubDate>
		<guid>http://www.derekscruggs.com/search-engine-optimization-seo-for-phpbb-urls.html#comment-309</guid>
					<description>You can use 'india' instead of 'forum' just so long as you replace it in the regex. However, you can't drop the constant ('india' or 'forum') altogether and just use $forum_name because those constants are handles used to pair the ID of the forum/topic with the proper script (viewforum.php or viewtopic.php). 

In other words, something like 'india-' . $forum_name . '-' . etc should work with this rule:

RewriteRule ^/sun/india-(.*)-id_([0-9]*).html /sun/viewforum.php?f=$2 [QSA]

.. but  $forum_name . '-'  without the 'india' prefix won't work because the rewrite rule won't know which script to send it to.</description>
		<content:encoded><![CDATA[<p>You can use &#8216;india&#8217; instead of &#8216;forum&#8217; just so long as you replace it in the regex. However, you can&#8217;t drop the constant (&#8217;india&#8217; or &#8216;forum&#8217;) altogether and just use $forum_name because those constants are handles used to pair the ID of the forum/topic with the proper script (viewforum.php or viewtopic.php). </p>
<p>In other words, something like &#8216;india-&#8217; . $forum_name . &#8216;-&#8217; . etc should work with this rule:</p>
<p>RewriteRule ^/sun/india-(.*)-id_([0-9]*).html /sun/viewforum.php?f=$2 [QSA]</p>
<p>.. but  $forum_name . &#8216;-&#8217;  without the &#8216;india&#8217; prefix won&#8217;t work because the rewrite rule won&#8217;t know which script to send it to.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: abhishek</title>
		<link>http://www.derekscruggs.com/search-engine-optimization-seo-for-phpbb-urls.html#comment-308</link>
		<pubDate>Thu, 11 Aug 2005 05:31:45 +0000</pubDate>
		<guid>http://www.derekscruggs.com/search-engine-optimization-seo-for-phpbb-urls.html#comment-308</guid>
					<description>hi,

finally seemed to get it to work... i suspect it was the regex after all.

i got another question...

line &amp;#62;&amp;#62; $view_forum_url=’forum-’ .$view_forum_url;

is we want to replace 'forum-' with say 'india-' or maybe even '$forum_name' .. would that be ok?

i tried it but it didnt work for me?

Thanks,

Abhishek</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>finally seemed to get it to work&#8230; i suspect it was the regex after all.</p>
<p>i got another question&#8230;</p>
<p>line &gt;&gt; $view_forum_url=’forum-’ .$view_forum_url;</p>
<p>is we want to replace &#8216;forum-&#8217; with say &#8216;india-&#8217; or maybe even &#8216;$forum_name&#8217; .. would that be ok?</p>
<p>i tried it but it didnt work for me?</p>
<p>Thanks,</p>
<p>Abhishek
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Derek Scruggs</title>
		<link>http://www.derekscruggs.com/search-engine-optimization-seo-for-phpbb-urls.html#comment-307</link>
		<pubDate>Wed, 10 Aug 2005 15:59:48 +0000</pubDate>
		<guid>http://www.derekscruggs.com/search-engine-optimization-seo-for-phpbb-urls.html#comment-307</guid>
					<description>Hi Abishek,

Sorry you're having problems. It's hard to diagnose just by looking at the code. The code looks correct to me, but these kinds of things can be maddening.

To debug it, the first thing I would do is check to see if the regex is working. To do that, try redirecting to a site you *know* works, like Yahoo or Google:

RewriteRule ^/sun/topic-(.*)-id_([0-9]*).html http://www.yahoo.com [QSA]
RewriteRule ^/sun/forum-(.*)-id_([0-9]*).html http://www.google.com [QSA]

With this setup, clicking on a topic takes you to Yahoo, and clicking on a forum link takes you to Google.

If you don't end up at Yahoo or Google, that means the regex is not being triggered. If you *do* get redirected, that means the regex is working, but that the final redirect is not properly formed.</description>
		<content:encoded><![CDATA[<p>Hi Abishek,</p>
<p>Sorry you&#8217;re having problems. It&#8217;s hard to diagnose just by looking at the code. The code looks correct to me, but these kinds of things can be maddening.</p>
<p>To debug it, the first thing I would do is check to see if the regex is working. To do that, try redirecting to a site you *know* works, like Yahoo or Google:</p>
<p>RewriteRule ^/sun/topic-(.*)-id_([0-9]*).html <a href='http://www.yahoo.com' rel='nofollow'>http://www.yahoo.com</a> [QSA]<br />
RewriteRule ^/sun/forum-(.*)-id_([0-9]*).html <a href='http://www.google.com' rel='nofollow'>http://www.google.com</a> [QSA]</p>
<p>With this setup, clicking on a topic takes you to Yahoo, and clicking on a forum link takes you to Google.</p>
<p>If you don&#8217;t end up at Yahoo or Google, that means the regex is not being triggered. If you *do* get redirected, that means the regex is working, but that the final redirect is not properly formed.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: abhishek</title>
		<link>http://www.derekscruggs.com/search-engine-optimization-seo-for-phpbb-urls.html#comment-305</link>
		<pubDate>Tue, 09 Aug 2005 01:55:52 +0000</pubDate>
		<guid>http://www.derekscruggs.com/search-engine-optimization-seo-for-phpbb-urls.html#comment-305</guid>
					<description>Hello,

i tried to install this hack but so far it hasnt worked... i found some minor errors with the code above but i think i managed to correct them... not sure if i did the right thing...
==============Index.php=============
$forum_name=$forum_data[$j]['forum_name'];
$view_forum_url=trim($forum_name);
$view_forum_url='forum-' .$view_forum_url;
$view_forum_url=str_replace('','-',$view_forum_url);
$view_forum_url=str_replace('/','-',$view_forum_url);
$view_forum_url=(urlencode($view_forum_url).&quot;-id_$forum_id&quot;);
$view_forum_url .='.html';
$view_forum_url=append_sid($view_forum_url);
===============end index.php============
i added  ‘U_VIEWFORUM’ =&amp;#62; $view_forum_url) and commented the line as shown

===============viewforum.php==============
$view_topic_url=trim($topic_title);
$view_topic_url='topic-' . $view_topic_url;
$view_topic_url=str_replace(' ','-',$view_topic_url);
$view_topic_url=str_replace('/','-',$view_topic_url);
$view_topic_url = (urlencode($view_topic_url).&quot;-id_$topic_id)&quot;;
$view_topic_url .='.html';
$view_topic_url=append_sid($view_topic_url);
==========end of viewforum.php==========

============ .htaccess =============
RewriteEngine on
RewriteRule ^/sun/topic-(.*)-id_([0-9]*).html /sun/viewtopic.php?t=$2 [QSA]
RewriteRule ^/sun/forum-(.*)-id_([0-9]*).html /sun/viewforum.php?f=$2 [QSA]
RewriteCond %{HTTP_REFERER} !^http://sunsigns.org/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://sunsigns.org$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.sunsigns.org/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.sunsigns.org$      [NC]
RewriteRule .*\.(jpg&amp;#124;jpeg&amp;#124;gif&amp;#124;png&amp;#124;bmp)$ http://www.sunsigns.org [R,NC]
============end of .htaccess==========

i cant figure out what i am doin wrong? maybe you can help?

http://www.netalways.com/sun

the real domain is www.sunsigns.org but dont wont to do stuff there till it work here. i am using phpBB 2.0.14. with eXtreme Styles and Morpheus. 

Thanks in advance,
 
Abhishek</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>i tried to install this hack but so far it hasnt worked&#8230; i found some minor errors with the code above but i think i managed to correct them&#8230; not sure if i did the right thing&#8230;<br />
==============Index.php=============<br />
$forum_name=$forum_data[$j][&#8217;forum_name&#8217;];<br />
$view_forum_url=trim($forum_name);<br />
$view_forum_url=&#8217;forum-&#8217; .$view_forum_url;<br />
$view_forum_url=str_replace('&#8217;,'-&#8217;,$view_forum_url);<br />
$view_forum_url=str_replace(&#8217;/',&#8217;-',$view_forum_url);<br />
$view_forum_url=(urlencode($view_forum_url).&#8221;-id_$forum_id&#8221;);<br />
$view_forum_url .=&#8217;.html&#8217;;<br />
$view_forum_url=append_sid($view_forum_url);<br />
===============end index.php============<br />
i added  ‘U_VIEWFORUM’ =&gt; $view_forum_url) and commented the line as shown</p>
<p>===============viewforum.php==============<br />
$view_topic_url=trim($topic_title);<br />
$view_topic_url=&#8217;topic-&#8217; . $view_topic_url;<br />
$view_topic_url=str_replace(&#8217; &#8216;,&#8217;-',$view_topic_url);<br />
$view_topic_url=str_replace(&#8217;/',&#8217;-',$view_topic_url);<br />
$view_topic_url = (urlencode($view_topic_url).&#8221;-id_$topic_id)&#8221;;<br />
$view_topic_url .=&#8217;.html&#8217;;<br />
$view_topic_url=append_sid($view_topic_url);<br />
==========end of viewforum.php==========</p>
<p>============ .htaccess =============<br />
RewriteEngine on<br />
RewriteRule ^/sun/topic-(.*)-id_([0-9]*).html /sun/viewtopic.php?t=$2 [QSA]<br />
RewriteRule ^/sun/forum-(.*)-id_([0-9]*).html /sun/viewforum.php?f=$2 [QSA]<br />
RewriteCond %{HTTP_REFERER} !^http://sunsigns.org/.*$      [NC]<br />
RewriteCond %{HTTP_REFERER} !^http://sunsigns.org$      [NC]<br />
RewriteCond %{HTTP_REFERER} !^http://www.sunsigns.org/.*$      [NC]<br />
RewriteCond %{HTTP_REFERER} !^http://www.sunsigns.org$      [NC]<br />
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ <a href='http://www.sunsigns.org' rel='nofollow'>http://www.sunsigns.org</a> [R,NC]<br />
============end of .htaccess==========</p>
<p>i cant figure out what i am doin wrong? maybe you can help?</p>
<p><a href='http://www.netalways.com/sun' rel='nofollow'>http://www.netalways.com/sun</a></p>
<p>the real domain is <a href='http://www.sunsigns.org' rel='nofollow'>www.sunsigns.org</a> but dont wont to do stuff there till it work here. i am using phpBB 2.0.14. with eXtreme Styles and Morpheus. </p>
<p>Thanks in advance,</p>
<p>Abhishek
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Doug Hudiburg</title>
		<link>http://www.derekscruggs.com/search-engine-optimization-seo-for-phpbb-urls.html#comment-3</link>
		<pubDate>Mon, 13 Dec 2004 18:13:33 +0000</pubDate>
		<guid>http://www.derekscruggs.com/search-engine-optimization-seo-for-phpbb-urls.html#comment-3</guid>
					<description>Hi Derek,

You have convinced me to use WordPress, It seems to be perfect for my needs.  I'll let you know how it goes.  We are going to turn the &lt;a href=&quot;http://www.dailymarketingace.com/tiparchive.aspx&quot;&gt; DMA &lt;/a&gt;archives into a blog.  Duh.  Don't know why I didn't think of that earlier.

Doug</description>
		<content:encoded><![CDATA[<p>Hi Derek,</p>
<p>You have convinced me to use WordPress, It seems to be perfect for my needs.  I&#8217;ll let you know how it goes.  We are going to turn the <a href="http://www.dailymarketingace.com/tiparchive.aspx"> DMA </a>archives into a blog.  Duh.  Don&#8217;t know why I didn&#8217;t think of that earlier.</p>
<p>Doug
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
