| | |
getting variable without extension
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2009
Posts: 55
Reputation:
Solved Threads: 2
AOA,
i am developing a site, i want that when ever a user signs up on my site, it should get its own folder like youtube........!! i.e
youtube.com/user/username
my problem is that i want to get variable wihout adding any .php extension. So how can i get or add when user types following
mysite.com/user/username
and i get user.php?user=username but in address bar it only show
user/username please help waiting here
i am developing a site, i want that when ever a user signs up on my site, it should get its own folder like youtube........!! i.e
youtube.com/user/username
my problem is that i want to get variable wihout adding any .php extension. So how can i get or add when user types following
mysite.com/user/username
and i get user.php?user=username but in address bar it only show
user/username please help waiting here
What you're looking for is called URL rewriting. If you're using a framework, like Zend Framework or CodeIgniter, then you have that out of the box.
If you're using plain PHP, you have to do that manually on the Apache web server. Check those links for a little help:
http://en.wikipedia.org/wiki/Rewrite_engine
http://www.yourhtmlsource.com/sitema...rewriting.html
Good luck.
Cheers
If you're using plain PHP, you have to do that manually on the Apache web server. Check those links for a little help:
http://en.wikipedia.org/wiki/Rewrite_engine
http://www.yourhtmlsource.com/sitema...rewriting.html
Good luck.
Cheers
Mario Awad - Software Developer
http://www.softkube.com
http://www.softkube.com
![]() |
Similar Threads
- variable help first time using C++ (C++)
- Basic PHP - MySQL Value into Variable (PHP)
- Urgent help #2 (C++)
- Variable Scope (C#)
- passing php variable into xml script (PHP)
- variable length array may not be initialized: error (C)
- PHP extension querie! .php?id=2 (PHP)
- Using a variable for filename (C++)
- [Warning] address of local variable returned??? (C++)
- Fetching Part Of the String using seperator (Shell Scripting)
Other Threads in the PHP Forum
- Previous Thread: PHP to png, png to pdf
- Next Thread: Count Files in Server
| Thread Tools | Search this Thread |
.htaccess ajax apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code cron curl database date directory display download duplicates dynamic echo email emptydisplayvalue error errors execute explodefunction file files folder form forms function functions google href htaccess html image include insert integration ip java javasciptvalidation javascript joomla keywords limit link login loop mail menu mlm mod_rewrite multiple mysql oop oracle paypal pdf php problem query radio random recursion recursive regex remote script search server sessions shot sms soap source space sql subscription syntax system table tutorial update upload url validation validator variable video web xml youtube





