[PHP] how to redirect page to a diffrent dir?

Ultimate Windows 7 ultimate 64-bit
January 11, 2011 at 10:25:54
Specs: Windows 7, 1 Gig
Hi, i have a little login system i made and i am also a novice so lower the heat im just learning but. it will check the user and redirect to a page for that particular user. but my server files all the .php/htm files are in 1 folder and it looks just bad i want that to change... what i want is when the user (nate) logs in it will go to a page that is located in users/nate folder. so everything look neater and eazyer to manage. right now im just using this command to go to the page in the same directory ...... header("location: $page"); where $page=the name of the page listed in the database i have. =P

See More: [PHP] how to redirect page to a diffrent dir?

Report •

January 11, 2011 at 19:04:33
You do it w/ .htaccess & mod_rewrite. The webserver redirects non-existing URL's to a single file, with the original request as a GET variable.

Read this: http://www.desiquintans.com/cleanurls

Report •

January 20, 2011 at 20:12:48
thank you that worked

Report •

Related Solutions

Ask Question