0

I work with wordpress, and I wanted to change my permalink from "default" to "post name". after i changed it i got an 404 error from apache. then I searched and get this: Wordpress permalink structure change issue when I write this commant "sudo a2enmod userdir" and refresh my page, I get 500 error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

here is my server log error:

127.0.0.1:45292] /var/www/tvvarzesh.dev/public_html/.htaccess: Invalid command 'BEGIN', perhaps misspelled or defined by a module not included in the server configuration

what should I do? thanx

Community
  • 1
  • 1

1 Answers1

1

Please follow the below steps:

  1. Go to Dashboard > Settings > Permalinks
  2. Select a suitable permalink structure and click Save.
  3. WordPress will generate a new .htaccess file code, copy the code.
  4. Create a file named .htaccess in the WordPress root directory and paste the code into it and save.
Anoop Asok
  • 1,311
  • 1
  • 8
  • 20