Creating .httacess for wordpress

0

I configured a wordpress in a linux hosting, I need to set up for that url of the post instead of:

link

be:

link

I read that I should stick to the httpd.conf file however this is impossible because I am hosting the site. In this link they teach how to edit httpd.conf for this problem: link

How to create a .htaccess file? I tried to put the code:

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Send would-be 404 requests to Craft
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
    RewriteRule (.+) index.php?p=$1 [QSA,L]
</IfModule>

But when uploading this file the site gives a 500 error. I inserted the file into both the www and root folder, before the www

    
asked by anonymous 02.06.2015 / 19:06

1 answer

0

correct code for .htaccess

So that Wordpress does not need /index.php/ in the permanent links.

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

Create in Notepad and save as:

    
09.06.2015 / 21:34