Thread: Htaccess help

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2007
    Posts
    113
    Rep Power
    0

    Htaccess help


    Hello

    I'm using the following htaccess rule to allow a user to view a profile based on username. e.g. domain.com/username:

    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^/]+)/?$ view.php?quickaddr=$1 [NC,L]
    </IfModule>
    However, I'd also like to create some friendly url's for my blog.

    Is it possible to do this from the same .htaccess file, or would I need to move my blog to a new folder?

    At the minute my blog is at domain.com/blog.php and profile at domain.com/view.php
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,986
    Rep Power
    9397
    Unless you can make your view.php tell the difference between a user and a blog, and can guarantee there won't be any overlap between the two, then yes you'll have to keep them separate.

    Personally I'd prioritize the blog and move the user stuff to, like, /user/name.

IMN logo majestic logo threadwatch logo seochat tools logo