• Resolved anto60

    (@anto60)


    I’m new to wordpress.
    I installed wordpress 4.8.1 it on my debian 9 server with PHP7 and PHP-FPM configuration.

    I configured the site on a webroot of property of my user and of www-data how group user.
    The installation is very simple because i do not use plugin now.

    The permalink structure of my articles is the following: https://site/index.php/%year%/%monthnum%/%day%/%postname%.

    If I want to change the structure in https://site/postname I get 404 error found for any link (articles or pages), I only can use a structure how https://site/?p=26 or https://site/index.php/%postname% for example.

    This is my .htaccess on default permalink structure or my custome structure:

    # 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>

    # END WordPress

    This is the php-fpm site configuration:

    ; Unix user/group of processes
    user = my-user
    group = www-data

    ; The address on which to accept FastCGI requests.
    ; Valid syntaxes are:
    ; ‘ip.add.re.ss:port’ – to listen on a TCP socket to a specific IPv4 address on
    ; a specific port;
    ; ‘[ip:6:addr:ess]:port’ – to listen on a TCP socket to a specific IPv6 address on
    ; a specific port;
    ; ‘port’ – to listen on a TCP socket to all addresses
    ; (IPv6 and IPv4-mapped) on a specific port;
    ; ‘/path/to/unix/socket’ – to listen on a unix socket.
    ; Note: This value is mandatory.
    listen = /run/php/php7.0-fpm.sito.sock

    ; Set permissions for unix socket, if one is used. In Linux, read/write
    ; permissions must be set in order to allow connections from a web server. Many
    ; BSD-derived systems allow connections regardless of permissions.
    ; Default Values: user and group are set as the running user
    ; mode is set to 0660
    listen.owner = my-user
    listen.group = www-data
    listen.mode = 0660

    This is virtual host configuration:

    <VirtualHost *:80>

    ServerName site
    DocumentRoot /var/www/site

    LogLevel info

    ErrorLog ${APACHE_LOG_DIR}/error-sito.log
    CustomLog ${APACHE_LOG_DIR}/access-sito.log combined

    <FilesMatch “\.php$”>
    SetHandler “proxy:unix:///var/run/php/php7.0-fpm.site.sock|fcgi://site”
    </FilesMatch>

    </VirtualHost>

    How can i use a permalink structure how https://site/post-name?
    Many thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I can not use a custom permalink structure’ is closed to new replies.