|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
PHP-General - Link changing
Hi
i need some help thats my web Code:
http://smsxone.com/ i buy the script from some one now i want to change its URL my catagory shows URL like that Code:
http://smsxone.com/user_sms.php?id=37 I want to change it .. like that Code:
http://smsxone.com/funny_sms would u like to teach me how can i do this plz i personlu belive that it will be possible though .htaccess file but dont know how :-s there is .htaccess file in the script which shows following text Code:
AuthType Basic AuthName "Restricted Area" AuthUserFile "/home/smsxone/.htpasswds/public_html/include/passwd" plz help me to make such kind of urls thanks in advance |
|
#2
|
|||
|
|||
|
This is an Apache question, only marginally related to PHP.
You'll need to add some rewrite rules to the .htaccess file, e.g. Code:
<ifModule mod_rewrite.c> RewriteEngine On RewriteRule ^funny_sms/?$ user_sms.php?id=37 [L] </ifModule> This will change any incoming requests for 'funny_sms' to user_sms.php?id=37. This can be done with any incoming request to create 'friendly URLS'. Similarly, you can do Code:
RewriteRule ^sms/funny/?$ user_sms.php?id=37 [L] That might be more appropriate if you have several different categories of SMS messages you want to output; the logical thing to do is simply tack the category name to the end of the 'sms' request. Please read the mod_rewrite thread in the Apache forum, post there if you have any questions. There are alot of good tutorials online as well. You'll also want to brush up on regular expressions as they play an essential role in getting rewrite rules to work.
__________________
BookMooch.com : Give books away. Get books you want. |
|
#3
|
|||
|
|||
|
but i want to chang the whole webs catagories
there are more than 50 catagories |
|
#4
|
|||
|
|||
|
You'll want to create a rewrite rule for each category.
|
|
#5
|
|||
|
|||
|
Aha thanks
let me try it ![]() very very thanks ![]() i hope it would be work |
|
#6
|
|||
|
|||
![]() |
|
#7
|
|||
|
|||
|
Thanks bRo fOr Ur helP....
I have Tried And Its Working Fine . . . Code:
http://www.smsxone.com/free-sms/Funny-sms/ But There Are Some Problems Yet . . . 1) Its Not ShowinG In Categaries . . . Just Redirect By Enter The URL NOt From category Navigation ... 2) When I Use paging I Comes back To The Origical Form LIke This : Code:
http://www.smsxone.com/user_sms.php?id=23&pg=2 sO whAt shUd i dO for thAt . . . |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > PHP-General - Link changing |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|