SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Search Engine Friendly URL's - would this work?

    Hi all,

    I read the Sitepoint article, Search Engine-Friendly URLs, a while back and decided to use the first method (i.e. /article.php/12345) which I was fine with - I couldn't use the third one (i.e. /article/12345) because my host doesn't support .htaccess [img]images/smilies/frown.gif[/img] But I've just come across a thread in this forum where someone uses a function basically like the one below:
    PHP Code:
    header('Content-Type: [something]'); 
    I want to know, can I use this method instead of .htaccess to successfully work the second method discussed in the article? And if it will work, what will I need to replace the [something] with in my PHP file? (You've probably guessed it needs to tell it to parse as PHP )

    Thanks in advance [img]images/smilies/smile.gif[/img]

    -Sam
    Sam Hastings

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No wonder I got no replies... it's a stupid question

    -Sam
    Sam Hastings

  3. #3
    SitePoint Wizard Crowe's Avatar
    Join Date
    Nov 2001
    Location
    Huntsville
    Posts
    1,117
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It's not a stupid question, it's perfectly valid.

    However, the server has to know before hand that it's php before it can execute a php statement. Close, but no cigar here


    My server also has problems with #3. Try this instead, which works for me just fine!

    Instead of Aspens code:

    Code:
    <Files article>  
     ForceType application/x-httpd-php  
    </Files>
    Try this:

    Code:
    <FilesMatch "^article$">
        ForceType application/x-httpd-php
    </FilesMatch>
    Chrispian H. Burks
    Nothing To Say

  4. #4
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah but the thing is here, my host doesn't offer .htaccess support at all Annoying I know. I'm hoping to move away from them soon anyway.

    Thanks for your help anyway

    -Sam
    Sam Hastings

  5. #5
    SitePoint Wizard Crowe's Avatar
    Join Date
    Nov 2001
    Location
    Huntsville
    Posts
    1,117
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ouch. Not .htaccess support. I feel your pain. I wish you good luck finding a fantastic host that never goes down. And when you find them, please let me know
    Chrispian H. Burks
    Nothing To Say

  6. #6
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah I've sorted out the one I'm going with... I was a young fool when I bought a package with my current host though.

    -Sam
    Sam Hastings


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •