Forum Moderators: coopster

Message Too Old, No Replies

smart navigation for Seo ...?

thanhnguyen asking for navigation

         

thanhnguyen

4:48 am on Apr 19, 2005 (gmt 0)

10+ Year Member



Hi guys.

I am a newbie here, and I am not familiar with php programing. Now I want to build a dynamic pages with index.php and php navigation, a smart navigation for SEO like this.
hxxp://mydomain.com/index.php
hxxp://mydomain.com/vietnam_tour/index.php
hxxp://mydomain.com/vietnam_tour/trekking_tour/sapa_trekking.php
something like that...

In the pass I used this:

Quote:
Quote:
[?php
if(!isset($_GET['page'])){
include "ps_vietnam_tour_operator_travel_agency_welcome_page.php";
}
elseif(isset($_GET['page'])){
if(file_exists("".$_GET['page'].".php")){
include "".$_GET['page'].".php";
}else{
echo"<h3>Your site was not found or under contruction</h3>
<p>Hit <i>back button</i> on your Browser to go back.";
}
}else{
include "ps_firstpage.php";
}
?]

to call file *.php in directory.
But it's not good for indexing in search engine, not friendly at all.
Someone knows how to build a smart navigation as I want and show me how to link to page (call pages), please post here.
Thanks man
Looking for good news from you my firends online

jd01

7:33 am on Apr 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi thanhnguyen,

I normally use php for my page creation only, then mod_rewrite for search engine friendly url's. This does two things for me:
1. It keeps things straight in my head. My php only does php. Apache does URL's.

2. If anything breaks I know where it is... page not found=mod_rewrite : page won't display=php.

I know you can do this through php, but if you would like to use mod_rewrite, you might check out the apache forum.

Just my thoughts FWIW.

Justin

thanhnguyen

10:22 am on Apr 19, 2005 (gmt 0)

10+ Year Member



I really do not want to use mode_rewrite ...another way?

jd01

10:34 am on Apr 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's always another way... I just can't help you with that one ;).

Justin

itmanvn

12:04 pm on Apr 19, 2005 (gmt 0)



Hi, vietnamese :D here's my way, where do you live HCMC or HN?

[codes]
<?
// Root path
define( 'ROOT_PATH', "./" );

$choice = array(
'home' => 'home',
'jobs' => 'jobs',
'contact' => 'contact',
'news' => 'news',
'readnews' => 'readnews',
'projects' => 'projects',
'viewproject'=> 'viewproject',
'catview'=> 'catview',
'clients'=> 'clients',
'logout' => 'logout'
);

/***************************************************/
if (! isset($choice[ $_GET['act'] ]) )
{
$_GET['act'] = 'home';
}

require ROOT_PATH."sources/".$choice[ $_GET['act'] ].".php";

?>
[/codes]

thanhnguyen

2:03 am on Apr 20, 2005 (gmt 0)

10+ Year Member



thanks man.

I am from Hanoi Vietnam, just a newbie to php
Can you post full code? and how it work? for example can you post navigation.php and index.php inlcude header and footer php as well.

Waiting for your answer