How to Code in PHP for SEO and non SEO Url > Giving Choice to User
<p>I am writting Code in PHP, and i want to give my user options to use SEO url or not to use SEO URL in admin panel.</p>

<p>he will be given .htaccess code to save in his current .htaccess page.</p>

<p>Now, by default there is no SEO URL.</p>

<p>Therefore I am coding in my php code like below ></p>

<pre><code>&lt;a href="&lt;?php echo $domain."/".$cat_page.".php?id=".$cat_id."&amp;title=".$title."&amp;query=".$query; ?&gt;/" &gt;&lt;?php echo $title; ?&gt;&lt;/a&gt;
</code></pre>

<p>Now, When i have to allow the SEO Url, </p>

<p>How can i implement below link automatically, without editing any code and even in view source the SEO link is shown like below ></p>

<pre><code>&lt;a href="&lt;?php echo $domain."/".$cat_page.".php/".$cat_id."/".$title."/".$query; ?&gt;/" &gt;&lt;?php echo $title; ?&gt;&lt;/a&gt;
</code></pre>

<p>Do i need to save the SEO code in database column. If yes how can i guess the SEO URL before the title and category is added.</p>

<p>IF on fly how can i implement the code in all pages whenever pages are requested.</p>

<p>Don't tell me , you have to do with <strong>.htaccess</strong> I know that, but whenever i load my page, in view source non-seo urls are shown and .htaccess has no effect too.. I want to show seo url in view source too.. How should i write in my php code, Give me Idea, so that i can start writting code for that and show you.</p>

<p>Thanks.</p>

<p>This is Deep request to all <strong>moderators</strong> and <strong>staff</strong> to not close this thread saying duplicate or useless or FAQ, I am Damn Serious and i want to learn it tonight, It has been too much pain in my ass and i can't find right solution till now.</p>

<p>I request all knowledgable LEETS , ELITES of PHP to help me in this.</p>

<p>Thanks once again</p>
