How To Rewrite URLs In WordPress
In this tutorial we are going to look at how you can use the built in WordPress rewriting API to create your own unique links for your website. WordPress will already use this for it's own functionality when you select a new permalink structure. What Is Rewriting? URL rewriting is when you change what content is displayed by the server, normally when you type in a URL the web server will simply search for any files in that location. But with rewriting you can still show the same URL but in the back-end change where the server will look for the content. Therefore we can have a URL of /website-1 but tell the server to display content that is located in /website-1/content/index.php How WordPress Uses Rewrite For Custom URLs When you go to Settings -> Permalinks , you will need to select how you want your URLs to appear on WordPress. You have many different options to choose from the default WordPress will use is ?p={post_id}, this is the value that is stored ...