Click here to Skip to main content
15,867,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Guys. .
i am in trouble can any one help me i wan to use my php page like wordpress

example my link : www.mydomain.com/page.php?name=cap
and i want my link like

www.mydomain.com/cap

anyone help me pls i really need this code thank in advance
Posted

1 solution

This has nothing to do with masterpages or wordpress.
What you ask for is seo optimized url's. It is called url rewrite.
See this article for apache mod_rewrite: http://coding.smashingmagazine.com/2011/11/02/introduction-to-url-rewriting/[^], and IIS url rewrite: http://www.domagojsalopek.com/Details/Introduction-to-URL-Rewriting-using-IIS-URL-Rewrite-Module-and-Regular-Expressions/26/CommentPage[^]
 
Share this answer
 
Comments
hasam53 19-Jan-13 16:17pm    
Bro i didnt Get it Can you tell me with propre code :(
Zoltán Zörgő 19-Jan-13 16:27pm    
I doubt you have read the articles I have linked. There you have all. But here is an other, maybe you should start here: http://www.roscripts.com/Pretty_URLs_-_a_guide_to_URL_rewriting-168.html.
The key: you have t set up a rewrite rule in the web server, and direct all calls to a single entry. That one will be the router. You have to make your code to use this approach. I can't give you more code than in the article above, since there you have the basic implementation - more would be too much. But if you want you can consult the wordpress engine source too: http://wordpress.org/download/source/
hasam53 20-Jan-13 8:50am    
bro i try it pretty URL but its not working :(
Zoltán Zörgő 20-Jan-13 9:13am    
What is not working? The url is working for sure. Aren't you behind a proxy blocking your access?
hasam53 20-Jan-13 9:18am    
You Can See here www.softodix.com/photo/

i make code and put that in .htaccess but still my url ugly :(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900