| | |
About URL Rewriting...
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Im shanti..
I am developing one dynamic site ,
here my product display page is like products.php?prod_id=1
It means the products under first category are displayed..
but i want my url like products/categoryname.html..something like this, with my category name...which will spiderable format..
Please help me to do this...
All helps are much appreciated
I am developing one dynamic site ,
here my product display page is like products.php?prod_id=1
It means the products under first category are displayed..
but i want my url like products/categoryname.html..something like this, with my category name...which will spiderable format..
Please help me to do this...
All helps are much appreciated
Last edited by Shanti Chepuru; Dec 15th, 2008 at 2:39 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Hi..
Im also new to this concept... But i think i can try...
All this can be done in the .htaccess file in the root folder of your website...
You can search on mod_rewrite or rewriterule on google to get more tutorials and details...
Im not sure about the above code... But even i learnt this from a tutorial...
Im also new to this concept... But i think i can try...
All this can be done in the .htaccess file in the root folder of your website...
You can search on mod_rewrite or rewriterule on google to get more tutorials and details...
PHP Syntax (Toggle Plain Text)
RewriteEngine On RewriteRule ^/products/(.*).html$ /products\.php?category_name=$1
Im not sure about the above code... But even i learnt this from a tutorial...
•
•
Join Date: Apr 2008
Posts: 293
Reputation:
Solved Threads: 11
url like product.php?prod_id=1 it does not have importance to that URL as search engine sees “?” sign treat it as a url which keeps on changing.
so convert the dynamic URL product.php?prod_id=1 to static url format product-5.html.
So rewrite the url like it display product-1.html but it actually cal product.php?prod_id=1.
so you rewrit url using .htaccess
You can find lots of tutorial on google...like
http://www.freewebmasterhelp.com/tutorials/htaccess/
http://www.easywebtutorials.com/tutorials/htaccess.html
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
so convert the dynamic URL product.php?prod_id=1 to static url format product-5.html.
So rewrite the url like it display product-1.html but it actually cal product.php?prod_id=1.
so you rewrit url using .htaccess
You can find lots of tutorial on google...like
http://www.freewebmasterhelp.com/tutorials/htaccess/
http://www.easywebtutorials.com/tutorials/htaccess.html
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
Last edited by Aamit; Dec 16th, 2008 at 2:36 am.
thanks amit for your clear explanation....
can you post correct code for the above example , you have specified..
and tel me where to put the .htaccess file,if my products page is in another folder...
thank you for your reply....
can you post correct code for the above example , you have specified..
and tel me where to put the .htaccess file,if my products page is in another folder...
thank you for your reply....
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
•
•
Join Date: Jan 2008
Posts: 7
Reputation:
Solved Threads: 0
If you want to use html url instead of the actual url then you have to use third party tool for this. Then you have to made httpd.ini file on the root of your site and keep all the html url in it. But you should first understand the regular expression to use these type of url otherwise your url may not work correctly.
•
•
•
•
If you want to use html url instead of the actual url then you have to use third party tool for this. Then you have to made httpd.ini file on the root of your site and keep all the html url in it. But you should first understand the regular expression to use these type of url otherwise your url may not work correctly.
can i make these type of urls with out httpd.ini file...if so tel me how to do that??????
thanks
shanti
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
•
•
•
•
thanks for your reply...
can i make these type of urls with out httpd.ini file...if so tel me how to do that??????
Last edited by buddylee17; Dec 16th, 2008 at 11:49 am.
Lost time is never found again.
- Benjamin Franklin
- Benjamin Franklin
![]() |
Similar Threads
- URL Rewriting pass query string (Linux Servers and Apache)
- url rewriting in php (PHP)
- How to rewrite url (ASP.NET)
- Dynamic ASP Rewrite URL (ASP)
- How to hide .php extension with url rewriting using .htaccess (PHP)
- Hiding QueryString from URL (ASP.NET)
Other Threads in the PHP Forum
- Previous Thread: how to use php mysql mysql_fetch_row
- Next Thread: include within include
| Thread Tools | Search this Thread |
.htaccess ajax apache api array beginner binary broken buttons cakephp checkbox class cms code cron curl database date directory display download dynamic ebooks echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link login loop mail mediawiki menu mlm mod_rewrite multiple mysql number oop paypal pdf php phpincludeissue phpmyadmin problem query radio random recursion regex remote script search server sessions sms soap source sp space speed sql subdomain syntax system table tag tutorial update upload url validation validator variable vbulletin video web websphere white xml youtube






