I have a wordpress website however I am not able to make the pretty permalinks work on it. The htaccess fil is writable on the server with file permissions 777.
So kidly guide me on the issues and how can I fix it. Here's the code for .htaccess file
# 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
I have a wordpress website however I am not able to make the pretty permalinks work on it. The htaccess fil is writable on the server with file permissions 777.
So kidly guide me on the issues and how can I fix it. Here's the code for .htaccess file
# 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
Share
Improve this question
edited Mar 20, 2019 at 6:13
Pratik bhatt
asked Mar 20, 2019 at 6:03
Pratik bhattPratik bhatt
1,2882 gold badges13 silver badges27 bronze badges
4
|
1 Answer
Reset to default 0If you have dedicated server then you must follow the below steps to run with .htacess
first of note that you need to create a configuration file for each site on your server using FTP.
as below
/etc/apache2/sites-available
go above path and then create file with below formate
e.g.
domain_name.domain_extension.conf
{ hello.conf }
add below code into it
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName hello
ServerAlias www.hello
DocumentRoot /var/www/html # your site data path
<Directory "/var/www/html"> # your site data path
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog /dev/null
CustomLog ${APACHE_LOG_DIR}/access.log combined # to check your log
</VirtualHost>
after setup it.
please switch your permalink two-time vice versa and update your link in WordPress database.
and check I hope its working.
If not working, please restart apache server then.
mod_rewrite
installed and enabled? Wordpress is in the root directory or subdirectory? – nmr Commented Mar 20, 2019 at 7:20