English 中文(简体)
在Bitnami/EC2的东道方举行演讲会
原标题:.htaccess rewrite for Wordpress host hosted on Bitnami/EC2

我在亚马孙第二中心安装了Bitnami Hugo Wordpresse。

The wordpress.conf file on a Bilnami instance act as an htaccess file.

名录结构如下:

/opt/bitnami/apps/wordpress/htdocs/index.php

www.un.org/chinese/sc/presidency.asp 档案

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]

这使得log与LURL一道出现。

http://ec2instance.com/wordpress/。

我想(包括在观察个别员额时):

http://ec2instance.com/blog/

http://ec2instance.com/blog/post- number-1

http://ec2instance.com/blog/post- number-2

等等

任何人都知道如何作出这一改变?

最佳回答

在这一档案中,你需要改变:

Alias /wordpress/ "/opt/bitnami/apps/wordpress/htdocs/"
Alias /wordpress "/opt/bitnami/apps/wordpress/htdocs"

页: 1

Alias /blog/ "/opt/bitnami/apps/wordpress/htdocs/"
Alias /blog "/opt/bitnami/apps/wordpress/htdocs"

随着这一改动,pache将在/blog中投放字句。

Then you need 页: 1 change the rewrite rules also in that file (because the new urls will use /blog instead of /wordpress).

RewriteBase /wordpress/
RewriteRule . /wordpress/index.php [L]

页: 1

RewriteBase /blog/
RewriteRule . /blog/index.php [L]

Finally you will need 页: 1 modify also the wp-config.php file (in apps/wordpress/htdocs) making sure that the WP_SITEURL and WP_HOME urls points 页: 1 /blog.

define( WP_SITEURL ,  http://  . $_SERVER[ HTTP_HOST ] .  /blog );
define( WP_HOME ,  http://  . $_SERVER[ HTTP_HOST ] .  /blog );
问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签