According to WordPress's .htaccess file, everything becomes index.php. Then, WordPress parses the URL to display the correct content.
How does WordPress maintain the URL? Why doesn't the URL become index.php?
According to WordPress's .htaccess file, everything becomes index.php. Then, WordPress parses the URL to display the correct content.
How does WordPress maintain the URL? Why doesn't the URL become index.php?
Mod rewrite doesn't automatically redirect, instead it will keep the fancy URL in your address bar. The accessing of the index file is private basically.
You might want to read up on mod rewrite to learn more about the process, as it is interesting.
ADD this to your .htaccess file.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
where i can get the .htaccess file
It should already be created. You may have to enable "View Hidden Files" or something to that affect in your FTP client.
If not, just create a new file called ".htaccess" in the root directory and paste in the code above.
More info can be found in the Using_Permalinks article in the codex.
This only applies to Apache hosted sites. '.htaccess' does not exist on IIS hosted sites.
This topic has been closed to new replies.