Install WordPress in your own directory, but the permanent link does not work

I installed WordPress on EC2 located at /var/www/html/wordpress. I followed the WordPress guide to copy index.php and .htaccess to root, which is /var/www/html, and changed index.php and installed in the admin panel. It works very well if I stick only to the default link, for example: http://www.cubcanfly.com/?p=5however other permalink options do not work, in fact all the permalink options.

My .htaccess is

# BEGIN WordPress
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

in /etc/httpd/conf/httpd.conf

LoadModule rewrite_module modules/mod_rewrite.so

NOT commented.

Thanks in advance

+5
3

, . AllowOverride httpd.conf, /etc/httpd/conf/httpd.conf, "sudo find/-name httpd.conf -print" . AllowOverride NONE- > ALL, . , - .htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

.htaccess , Wordpress .

@adlawson @Will, , .

http://codex.wordpress.org/Using_Permalinks , , Wordpress .

+7

RewriteBase .htaccess

RewriteBase / RewriteBase /wordpress

+4

I did not need to edit the RewriteBase in .htaccess. The problem is really in the httpd configuration for EC2 machines.

My .htaccess is

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

In / etc / httpd / conf / httpd.conf -

<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride All
0
source

All Articles