htaccess - Pretty Url not working on the server

I have a wordpress website however I am not able to make the pretty permalinks work on it. The htaccess fil is writable

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
  • can you please put your code here of .htaccess. – user147874 Commented Mar 20, 2019 at 6:06
  • Is it Apache? Is mod_rewrite installed and enabled? Wordpress is in the root directory or subdirectory? – nmr Commented Mar 20, 2019 at 7:20
  • Check similar questions e.g. this. – nmr Commented Mar 20, 2019 at 7:26
  • this is not code issues but its server issues please check it is your server is not shared server it is dedicated server so you need to config your self okay. – user147874 Commented Mar 20, 2019 at 10:46
Add a comment  | 

1 Answer 1

Reset to default 0

If 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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745673242a4639533.html

相关推荐

  • htaccess - Pretty Url not working on the server

    I have a wordpress website however I am not able to make the pretty permalinks work on it. The htaccess fil is writable

    21天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信