Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Hi guys,

    I'm not sure if I am posting this in the right section, so sorry in advance if this is the wrong place :-P

    There's a website where every single page is at index.php?page=about or index.php?page=contact. For SEO purposes, I'd like to convert it to be at /about, /contact, etc.

    I would still like the main handler to be 1 specific file, and it could do different things based on the parts of the path.

    This was really easy to do in AppEngine, I guess it is built-in. But I can't figure out how I would do this in just a regular PHP site. I mean if the website URL is www.example.com/about, won't the server look for the directory /about? How can I make it not look for the /about directory and instead just hand the request over to index.php? (Or some specific php file)

    Thanks!
    Heather
    choosy developers choose gif!
    website | paintings | blog

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Is this for the WP project you've been working on ??

    If so, there is a setting within the WP section to turn that on if the server that it's on had the apache mod-rewrite module turned on...

    If not for WP... And the sites is on a Linux server, then you can usually accomplish the same thing with an .htaccess rule. You can search the forums for specifics on that... I know I've seen it answered several times...

    If you're on a windows server... Sorry... I believe server 2008 supports something similar... But it's a major pain.

  4. #3
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Hi,

    Thanks for the reply! No it's not for the WP project, I am pretty sure this site is not in WP (but I have not been given the FTP info for it yet).

    I will try to find the info on the htaccess rule... but it's hard to figure out the correct terms to search for...

    Thanks again,
    Heather
    choosy developers choose gif!
    website | paintings | blog

  5. #4
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    I think I may have found it, is this it?
    http://www.kavoir.com/2010/02/use-ph...ly-manner.html
    choosy developers choose gif!
    website | paintings | blog

  6. #5
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    That should work... Personally, I've been using windows based servers since NT, just recently setup and running a Linux server with apache... Wow!!! What have I been missing all these years ?

    Now I just gotta find an extra 4-6 hours a day to play catch up.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:40 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com