I have a web site that is ready. I was looking on how to rank the site for the majer search engine. One thing that I read that the Spider will have problem with the aherf that has ?. I am wondering how can I go around this problem for my site.

The file is called index.php, the user would click on the cat and the cat store the cat value to call all related records from the database for display.

• <font class=whtext><a href="index.php?cat=Arts">
Arts</a> <br>
</font> • <font class=whtext><a href="index.php?cat=Automotive">
Automotive</a> <br>
</font> • <font class=whtext><a href="index.php?cat=Babies%20Needs">
Babies Needs</a> <br>
</font> • <font class=whtext><a href="index.php?cat=Beauty">
Beauty</a> <br>
</font> • <font class=whtext><a href="index.php?cat=Books">
....
..
..
.

Reply To This Message

    with apache you can use .htaccess and mod rewrite.

    in the .htaccess set:

    Options +Indexes
    RewriteEngine on
    

    then rewrite the urls (also in .htaccess), for example the rule for the link you posted. for categories you can choose a better name:

    RewriteRule ^categories/(.*)/$         /index.php?cat=$1
    

    the link for that rewrite rule would be:

    <a href="/categories/Automotive/">Automotive</a>
    <a href="/categories/Babies%20Needs/">Babies Needs</a>
    ...
    

    of course you can set more rewrite rules, for example for 2 $_GET['']s:

    RewriteRule ^categories/(.*)/(.*)/$         /index.php?cat=$1&subcat=$2
    

    the links for that rewrite rule would be:

    <a href="/categories/Automotive/subAuto/">Automotive</a>
    <a href="/categories/Babies%20Needs/subBabies/">Babies Needs</a>
    ...
    

      Thank you very much, I really like this way. I have couple of questions if you do not mind.

      I would put the following code in .htaccess file

      Options +Indexes
      RewriteEngine on
      RewriteRule categories/(.*)/$ /index.php?cat=$1

      I would change my a href in my main page

      from
      <a href="index.php?cat=Automotive">Automotive</a>

      to
      <a href="/categories/Automotive/">Automotive</a>

      My concerns
      1) is the varaible 'cat' going to be passed to other pages index.php from index.phtml.
      2) do I have to create a directory from the root and call it categories in this case.
      3) do I put any thing in the directory categories.e.i the index.phtml or the index.php files or create
      a directory for all categories.
      4)do i have to do any additional PHP programming for this to work.😕

        hello.

        i think for 1. you'll need another rewrite rule.
        RewriteRule categoriesPHP/(.)/$ /index.php?cat=$1
        RewriteRule categoriesPHTML/(.
        )/$ /index.phtml?cat=$1
        or whatever.
        2. no, dont think so.
        3. no.
        4. no.

          The major search engines don't mind 1 or 2 variables being added onto a url. They understand that sometimes we need them.

          Get into DMOZ as a priority. Google etc rely on DMOZ more than you'd expect. Unfortunately DMOZ's submission system has been faulty for ages but they are working on it. Check http://www.resource-zone.com/postlist.php?Cat=&Board=announce for progress reports.

          Search for "Search Engine Optimisation" and keep an eye on the forums. Good ones include SEOChat and SearchGuild.

            Write a Reply...