This is the rewrite script for wordpress to take out the index.php from the URL. Current: /index.php/%postname%/
1. Change the permalink settings in wordpress to custom structure. (/%postname%/)
2. Upload this script as rewrite.script.php and upload to root.
3. Test it! (it worked for me)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#Zeus webserver version of basic Wordpress mod_rewrite rules map path into SCRATCH:path from %{URL} look for file at %{SCRATCH:path} if exists then goto END look for dir at %{SCRATCH:path} if exists then goto END ##### FIX FOR LOGIN/FORGOTTEN PASSWORD/ADMIN ETC ##### match URL into $ with ^/wp-.*$ if matched then goto END ##### FIX TO ALLOW SEARCH TO WORK ##### match URL into $ with ^/(.*) set URL = /index.php/$1 |
OR for a normal server
1 2 3 4 5 6 7 8 9 10 |
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> |
1. Change the permalink settings in wordpress to custom structure. (/%postname%/)
2. Upload this script as .htaccess and upload to root.
3. Test it! (Yet to be confirmed….!)