| | |
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 array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dropdownlist dynamic echo email eregi error execution file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery key library limit link login loop mail menu mlm mod_rewrite multiple mysql oop overwrite paypal pdf pdfdownload php phpvotingscript problem query radio random recursion regex remote screen script search server sessions sms soap sorting source space sql startup syntax system table tutorial update upload url validation validator variable video web xml youtube zend





