<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Hardkap &#187; Tag: clean urls; htaccess - Recent Posts</title>
		<link>http://hardkap.net/forums/tags/clean-urls-htaccess</link>
		<description>Macpup, Pritlog, Pritdeals discussion forums</description>
		<language>en-US</language>
		<pubDate>Thu, 09 Feb 2012 08:42:55 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://hardkap.net/forums/search.php</link>
		</textInput>
		<atom:link href="http://hardkap.net/forums/rss/tags/clean-urls-htaccess" rel="self" type="application/rss+xml" />

		<item>
			<title>Prit on "Cleaner and Shorter URLs"</title>
			<link>http://hardkap.net/forums/topic/cleaner-and-shorter-urls#post-884</link>
			<pubDate>Sat, 11 Apr 2009 22:59:57 +0000</pubDate>
			<dc:creator>Prit</dc:creator>
			<guid isPermaLink="false">884@http://hardkap.net/forums/</guid>
			<description>&#60;p&#62;If we can get such a shorter and cleaner url working and as you mentioned rightly, to make it compatible with the older version also, it would be excellent.&#60;/p&#62;
&#60;p&#62;I liked the idea of adding robots,no-index, no-follow to the header dynamically. Thanks for this idea John. Pritlog should have this definitely.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>john on "Cleaner and Shorter URLs"</title>
			<link>http://hardkap.net/forums/topic/cleaner-and-shorter-urls#post-883</link>
			<pubDate>Sat, 11 Apr 2009 22:01:27 +0000</pubDate>
			<dc:creator>john</dc:creator>
			<guid isPermaLink="false">883@http://hardkap.net/forums/</guid>
			<description>&#60;p&#62;My first attempt was using htaccess because I wanted to get rid of index.php.&#60;/p&#62;
&#60;p&#62;But I think that it should be possible to &#34;decode&#34; them via PHP if you don't mind to keep index.php&#60;/p&#62;
&#60;p&#62;i.e:&#60;br /&#62;
&#60;a href=&#34;http://mydomain.com/cat/general/2/&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/cat/general/2/&#60;/a&#62; would look as&#60;br /&#62;
&#60;a href=&#34;http://mydomain.com/index.php/cat/general/2/&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/cat/general/2/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I imagine that first step would be taking all parameters after index.php and split them using &#34;/&#34; as delimiter; followed by some if statements to identify the type of url&#60;/p&#62;
&#60;p&#62;Some urls are uniquely defined by its &#34;keyword&#34; like main or rss; others as posts and cat are used twice (so directory levels, number of /, or checking if last directory contains a number might be valid methods to differenciate among them)&#60;/p&#62;
&#60;p&#62;Another consideration could be making things compatible for script to work with the new urls as well as with the original ones (something appreciated by people that have their blogs already indexed by search engines)&#60;/p&#62;
&#60;p&#62;PD: I was also thinking about ways to differenciate between links I want search engines to index and those thaty shouldn't (login, forgotPass, etc) &#60;/p&#62;
&#60;p&#62;What I've in mind is to use an if statement to add a robots no index no follow meta tag on header for some urls.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Prit on "Cleaner and Shorter URLs"</title>
			<link>http://hardkap.net/forums/topic/cleaner-and-shorter-urls#post-882</link>
			<pubDate>Sat, 11 Apr 2009 19:34:55 +0000</pubDate>
			<dc:creator>Prit</dc:creator>
			<guid isPermaLink="false">882@http://hardkap.net/forums/</guid>
			<description>&#60;p&#62;Sorry that I did not make my question clear. I was basically trying to find out, if these will work without htaccess, even if the urls had to have the index.php in them.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>john on "Cleaner and Shorter URLs"</title>
			<link>http://hardkap.net/forums/topic/cleaner-and-shorter-urls#post-881</link>
			<pubDate>Sat, 11 Apr 2009 18:03:19 +0000</pubDate>
			<dc:creator>john</dc:creator>
			<guid isPermaLink="false">881@http://hardkap.net/forums/</guid>
			<description>&#60;p&#62;I don't think so. As you said in a previous post getting rid of index.php required htaccess.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Prit on "Cleaner and Shorter URLs"</title>
			<link>http://hardkap.net/forums/topic/cleaner-and-shorter-urls#post-879</link>
			<pubDate>Sat, 11 Apr 2009 16:44:46 +0000</pubDate>
			<dc:creator>Prit</dc:creator>
			<guid isPermaLink="false">879@http://hardkap.net/forums/</guid>
			<description>&#60;p&#62;John .. These short urls look really clean. I loved it. Will these work if someone cannot do url rewrites using htaccess?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>john on "Cleaner and Shorter URLs"</title>
			<link>http://hardkap.net/forums/topic/cleaner-and-shorter-urls#post-877</link>
			<pubDate>Sat, 11 Apr 2009 10:13:27 +0000</pubDate>
			<dc:creator>john</dc:creator>
			<guid isPermaLink="false">877@http://hardkap.net/forums/</guid>
			<description>&#60;p&#62;Hi Prit,&#60;/p&#62;
&#60;p&#62;1. I just ended a new change to improve clean urls using .htaccess &#60;/p&#62;
&#60;p&#62;- script now works with original urls as well as with new ones. NO CONFLICTS !!&#60;br /&#62;
- new urls don't include &#34;index.php and end with / to look as directories&#60;br /&#62;
- new urls use less and shorter keywords&#60;/p&#62;
&#60;p&#62;Examples:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://mydomain.com/index.php/mainPage&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/mainPage&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://mydomain.com/main/&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/main/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://mydomain.com/index.php/viewCategory/somecat&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/viewCategory/somecat&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://mydomain.com/cat/somecat/&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/cat/somecat/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://mydomain.com/index.php/viewEntry/00020/somecat&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/viewEntry/00020/somecat&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://mydomain.com/posts/00020/somecat/&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/posts/00020/somecat/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://mydomain.com/index.php/viewEntry/00022/your-post-title&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/viewEntry/00022/your-post-title&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://mydomain.com/posts/00022/your-post-title&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/posts/00022/your-post-title&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://mydomain.com/index.php/mainPage/allCategories/page/2&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/mainPage/allCategories/page/2&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://mydomain.com/all/2/&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/all/2/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://mydomain.com/index.php/viewCategory/general/page/2&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/viewCategory/general/page/2&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://mydomain.com/cat/general/2/&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/cat/general/2/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;2. My .htaccess as follows:&#60;/p&#62;
&#60;p&#62;Options +FollowSymlinks&#60;br /&#62;
RewriteEngine On&#60;/p&#62;
&#60;p&#62;# single option&#60;br /&#62;
RewriteRule ^main/$ &#60;a href=&#34;http://mydomain.com/index.php/mainPage&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/mainPage&#60;/a&#62; [NC]&#60;br /&#62;
RewriteRule ^archive/$ &#60;a href=&#34;http://mydomain.com/index.php/viewArchive&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/viewArchive&#60;/a&#62; [NC]&#60;br /&#62;
RewriteRule ^comments/$ &#60;a href=&#34;http://mydomain.com/index.php/listAllComments&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/listAllComments&#60;/a&#62; [NC]&#60;br /&#62;
RewriteRule ^login/$ &#60;a href=&#34;http://mydomain.com/index.php/loginPage&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/loginPage&#60;/a&#62; [NC]&#60;br /&#62;
RewriteRule ^rss/$ &#60;a href=&#34;http://mydomain.com/index.php/RSS&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/RSS&#60;/a&#62; [NC]&#60;/p&#62;
&#60;p&#62;# view posts&#60;br /&#62;
RewriteRule ^posts/(.*)/(.*)/$ &#60;a href=&#34;http://mydomain.com/index.php/viewEntry/$1/$2&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/viewEntry/$1/$2&#60;/a&#62; [NC]&#60;/p&#62;
&#60;p&#62;# category page&#60;br /&#62;
RewriteRule ^cat/(.*)/(.*)/$ &#60;a href=&#34;http://mydomain.com/index.php/viewCategory/$1/page/$2&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/viewCategory/$1/page/$2&#60;/a&#62; [NC] [L]&#60;/p&#62;
&#60;p&#62;# view category&#60;br /&#62;
RewriteRule ^cat/(.*)/$ &#60;a href=&#34;http://mydomain.com/index.php/viewCategory/$1&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/viewCategory/$1&#60;/a&#62; [NC]&#60;/p&#62;
&#60;p&#62;# view allcategories / page&#60;br /&#62;
RewriteRule ^all/(.*)/$ &#60;a href=&#34;http://mydomain.com/index.php/mainPage/allCategories/page/$1&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/index.php/mainPage/allCategories/page/$1&#60;/a&#62; [NC]&#60;/p&#62;
&#60;p&#62;3. To use the new url format in the script, requires to adapt navigation links in the following functions (see examples above as a guide):&#60;/p&#62;
&#60;p&#62;- listPosts()&#60;br /&#62;
- viewEntry()&#60;br /&#62;
- sidebarCategories()&#60;br /&#62;
- sidebarPopular()&#60;br /&#62;
- sidebarListEntries()&#60;/p&#62;
&#60;p&#62;Example in listPosts():&#60;/p&#62;
&#60;p&#62;&#60;code&#62;//echo &#38;quot;&#38;lt;div class=\&#38;quot;post-title\&#38;quot;&#38;gt;&#38;lt;h3&#38;gt;&#38;lt;a class=\&#38;quot;postTitle\&#38;quot; href=&#38;quot;.$_SERVER[&#38;quot;SCRIPT_NAME&#38;quot;].&#38;quot;/viewEntry/&#38;quot;.$fileName.&#38;quot;/&#38;quot;.$titleModified.&#38;quot;&#38;gt;&#38;quot;.$title.&#38;quot;&#38;lt;/a&#38;gt;&#38;lt;/h3&#38;gt;&#38;quot;;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;to&#60;/p&#62;
&#60;p&#62;&#60;code&#62;echo &#38;quot;&#38;lt;div class=\&#38;quot;post-title\&#38;quot;&#38;gt;&#38;lt;h3&#38;gt;&#38;lt;a class=\&#38;quot;postTitle\&#38;quot; href=&#38;quot;.$BlogPath.&#38;quot;/posts/&#38;quot;.$fileName.&#38;quot;/&#38;quot;.$titleModified.&#38;quot;/&#38;gt;&#38;quot;.$title.&#38;quot;&#38;lt;/a&#38;gt;&#38;lt;/h3&#38;gt;&#38;quot;;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;4. Conclusions:&#60;/p&#62;
&#60;p&#62;- new urls are fully compatible with Pritlog's original ones (can use both types)&#60;br /&#62;
- new urls look &#34;cleaner&#34; and shorter, more in line with what other sites are using&#60;br /&#62;
- some people say that urls that look as directories (ending in /) get better ranking&#60;/p&#62;
&#60;p&#62;Sitemaps&#60;br /&#62;
- will do some more testing to see if new urls solve xml error I was getting when generating sitemaps (see sitemaps thread)&#60;br /&#62;
- I guess I'll probably also need to modify category separators from dot to underscore
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>

