Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When I changed the permalink to /%postname%/ I lost the connection with server... and I need to clean .htaccess to access again... how can i fix it?

What do I need to put in .htaccess?

My current .htaccess is:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

</IfModule>
# END WordPress
share|improve this question
    
What was the permalink setting before you changed it? –  s_ha_dum Jun 6 '13 at 4:30

1 Answer 1

The basic rewrite rules for pretty permalinks in WordPress look like this:

# 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

Note the RewriteRule. That part is missing in your file.

share|improve this answer
    
Hello, i changed my .htaccess. and now i see this message: 404 Page Not Found The page you requested was not found. –  Felipe Stoker Jun 6 '13 at 4:53
    
@FelipeStoker Is mod_rewrite active at all? –  toscho Jun 6 '13 at 4:55
    
I don't know. You'are talking about 'permissions' like 644, 755? –  Felipe Stoker Jun 6 '13 at 5:02
    
@FelipeStoker No, I’m talking about the Apache module. If you remove <IfModule mod_rewrite.c> and </IfModule>, do you get an error? –  toscho Jun 6 '13 at 5:10
    
I discovered the problem: RewriteEngine on #RewriteCond %{HTTP_HOST} ^XXX.com.br [NC] #RewriteRule (.*) XXX.com.br/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^(www.)?XXX.com.br$ RewriteCond %{REQUEST_URI} !^/2013/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /2013/blog$1 RewriteCond %{HTTP_HOST} ^(www.)?XXX.com.br$ RewriteRule ^(/)?$ 2013/blog [L] –  Felipe Stoker Jun 6 '13 at 13:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.