Google Canonization - How To Get PHP files to work in different folders?

Discussion in 'Google' started by TeDWooD, Sep 20, 2010.

  1. #1
    Hi im having a bit of trouble making all my pages look neat instead of all messed up and look spammy to the users. At the moment my sites url for specific reviews looks like this -
    www,abc.com/review-product-1.php
    Instead of -
    www,abc.com/reviews/product-1-review.php
    Its so hard to organise things in the original layout and i usually have to browse through lots of files.
    The reason its like this is because when i move everything to the 'Reviews' folder all the php includes don't work for some reason because all the root folders are messed up.
    Can someone help me?
     
    TeDWooD, Sep 20, 2010 IP
  2. smsinhindi

    smsinhindi Peon

    Messages:
    561
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Better if you post this topic in other forum. this is for Google not for PHP.
     
    smsinhindi, Sep 20, 2010 IP
  3. longcall911

    longcall911 Peon

    Messages:
    1,672
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It's is because you moved the *.php file from the root abc,com\ to a subfolder abc,com\reviews. The location of your includes is relative to the location of the *.php file.

    If you are comfortable with editing source code in your *.php files change the path of the include directive from something like "includes\" to "http:\\www.abc,com\includes\".

    This way, wherever a page may be, it always has the full path to your includes folder and will of course find the required file.
     
    longcall911, Sep 20, 2010 IP