Andrea Girardi
Andrea Girardi

Reputation: 4437

Php application url

I've a doubt. How can I configure my application to use www.mysite.com/myfolder instead of www.mysite.com/myfile.php?

I need to a create a profile page for every user registered to my PHP application but it's not so clear how can I do that. I've seen it's possibile with page frame, but, if possible, I prefrer don't use it.

Thanks for the suggestions!

cheers, Andrea

Upvotes: 0

Views: 98

Answers (4)

dnagirl
dnagirl

Reputation: 20456

you should check out mod_rewrite. Your real url might be www.mysite.com/somename.php. But mod_rewrite can make the display url be www.mysite.com/somename/

For your user profiles, let the url be something like www.mysite.com/user.php?user_id=x and the display url be www.mysite.com/user/x/

Upvotes: 0

klennepette
klennepette

Reputation: 3196

when you go to a website like www.mysite.com/myfolder what apache is actually doing is finding the 'index file' for that folder.This is usually a file called index.html or index.php.

What i suggest using for something like user profiles is Apache's mod_rewrite.

Upvotes: 1

robjmills
robjmills

Reputation: 18598

You can alter this by changing DocumentRoot in httpd.conf or by using mod_rewrite - its a bit context dependent though really

Upvotes: 0

LaikaN57
LaikaN57

Reputation: 66

Use Apache's mod_rewrite.

Upvotes: 2

Related Questions