Results 1 to 8 of 8

Thread: Would it be possible to do this with .htaccess?

  1. #1
    Join Date
    Feb 2007
    Posts
    145
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Would it be possible to do this with .htaccess?

    Hi all, i have some pages that i want to use .htaccess on, the file names are below:

    photos_something.php

    Would it be possible to make them appear as:
    /photos/something.php

    so they would appear in a doman as:
    http://www.domain.co.uk/photos/something.php

    instead of:
    http://www.domain.co.uk/photos_something.php

    Thanks very much, Ryan.

  2. #2
    Join Date
    Feb 2007
    Posts
    145
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Anyone?

  3. #3
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    I dont really know much about .htaccess myself but this old forum post might help: http://www.webmasterworld.com/forum92/2545.htm
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Yes, it's very possible. You won't find that exact situation anywhere, but you can adapt a similar situation (really, most mod_rewrite setups are similar), and just update the regex patterns in it for your specific setup.
    Alternatively you could look at my tutorial in the coding tips section, though it's a little complex. What it does is moves the redirect to PHP, so if you know PHP well but not .htaccess, it is easier.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    I forgot about your tutorial so thanks for reminding me. I think it could be useful to my next project.

    BTW - your external php javascript/CSS files tutorial has been most useful to me too.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Ah, that's from a long time ago. Glad it's still useful. That reminds me to add that one also to the PHP scripts site currently in development.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Yes, it looks like its coming along well. I have a few small snippets to contribute that I hope will be useful too.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  8. #8
    Join Date
    Feb 2007
    Posts
    145
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply

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
  •