?

Log in

No account? Create an account

Previous Entry | Next Entry

htaccess

it's tough googling for things when you're not sure how they're called.

I want to write an htaccess file that sits in a folder, so if someone types in "www.spacefem.com/members/joe", they'll see a page generated by "www.spacefem.com/members/memberpage.php?user=joe"

where "joe" = anything. doable? it's not a redirect per se, so I can't figure out what to call it. it should be so simple.

Comments

( 5 comments — Leave a comment )
hitchhiker
Sep. 10th, 2008 04:16 am (UTC)
it's doable, but you'll need server side code that does its own routing. you want to catch spacefem.com/members, have "joe" be the parameter to the function that handles it, and then redirect based on. read http://www.symfony-project.org/book/1_0/09-Links-and-the-Routing-System for instance.
metawidget
Sep. 10th, 2008 04:19 am (UTC)
Try googling "mod rewrite", I think that's what you're trying to do.
jume
Sep. 10th, 2008 04:43 am (UTC)
yup, definitely modrewrite, although depending on forum software, you might find a SEO plug-in that will do it for you.

If modrewrite is enabled, you can put something like this in .htaccess
RewriteEngine on
RewriteRule members/memberpage.php?user= members/ [R=301]

and I think it'll insert this in the middle of the url, but you'll want to double check :D
paranoidandroid
Sep. 10th, 2008 11:23 am (UTC)
Isn't that an alias?
(Deleted comment)
( 5 comments — Leave a comment )

Latest Month

November 2017
S M T W T F S
   1234
567891011
12131415161718
19202122232425
2627282930  
Powered by LiveJournal.com
Designed by Tiffany Chow