I installed a Bitnami Ubuntu WordPress instance on Amazon EC2.
The wordpress.conf file on a Bitnami instance acts like an htaccess file.
The directory structure is as follows:
/opt/bitnami/apps/wordpress/htdocs/index.php
The wordpress.conf file contains
Alias /wordpress/ "/opt/bitnami/apps/wordpress/htdocs/"
Alias /wordpress "/opt/bitnami/apps/wordpress/htdocs"
<Directory "/opt/bitnami/apps/wordpress/htdocs">
Options Indexes MultiViews +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</Directory>
# Uncomment the following lines to see your application in the root
# of your URL. This is not compatible with more than one application.
#RewriteEngine On
#RewriteRule ^/$ /wordpress/ [PT]
This makes the blog appear with this URL
http://ec2instance.com/wordpress/
I would like it to be (including when viewing individual posts):
http://ec2instance.com/blog/post-number-1
http://ec2instance.com/blog/post-number-2
etc
Anyone know how to make this change?
In that file you will need to change:
to
With that change apache will serve wordpress in
/blog.Then you need to change the rewrite rules also in that file (because the new urls will use
/bloginstead of/wordpress).to
Finally you will need to modify also the
wp-config.phpfile (inapps/wordpress/htdocs) making sure that theWP_SITEURLandWP_HOMEurls points to/blog.