Please Explain To Mehow Does Mod Rewrite Work And How To Use It
- Forums
- Dedicated Hosting
- Please Explain To Mehow Does Mod Rewrite Work And How To Use It
if you want to learn how mod rewrite works, i will try to explain it to you in a very simple way that a beginner would be able to understand what is mod rewrite from apache and how it works on your website [337], Last Updated: Sat May 18, 2024
wallpaperama
Wed Feb 16, 2011
0 Comments
1039 Visits
well, you can read about it in the official apache website here:
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
but for you, whats important to know is that with mod rewrite you can rewrite a url into a different url.
for example, lets say you have a blog and the url to access one of your blog pages is:
http://www.myblog.com/blog.php?blog_id=1945
as you can see from the above example, when you visit that page, it should open blog_id 1945 from your database,
but how about if you can have it the url like this instead:
http://www.myblog.com/1945.html
as you can see, the url is much shorter and it will display the same content
thats what mod rewrite can do for you. i believe wordpress calls these "permalinks"