Support » Fixing WordPress » Pretty permalinks not working

  • Resolved thecaligarmo

    (@thecaligarmo)



    I’m using apache and I have rewrite available:

    /etc/apache2$ ls mods-enabled/rewrite.load
    mods-enabled/rewrite.load

    I updated my permalinks through the admin panel to the pretty ones I want. I also added the appropriate .htaccess code:

    1 DirectoryIndex index.php
      2
      3 php_value upload_max_filesize 8M
      4 php_value post_max_size 8M
      5 php_value max_execution_time 200
      6 php_value max_input_time 200
      7
      8 # BEGIN WordPress
      9 <IfModule mod_rewrite.c>
     10 RewriteEngine On
     11 RewriteBase /
     12 RewriteRule ^index\.php$ - [L]
     13 RewriteCond %{REQUEST_FILENAME} !-f
     14 RewriteCond %{REQUEST_FILENAME} !-d
     15 RewriteRule . /index.php [L]
     16 </IfModule>
     17
     18 # END WordPress

    The website: thesmartroadtrip.com

    I know rewrite is working as thesmartroadtrip.com/index.php redirects to thesmartroadtrip.com properly. But whenever I click on any of the links it seems as though I can no longer access any of the pages.

    The website is a couple years old and I hadn’t touched it in a couple years so I had just upgraded it from a previous version (don’t recall which) and the permalinks don’t want to work. I can get the ugly links to work (?p=xxx) but I’d prefer if it showed the proper settings.

    I’ve also tried to go into wp-includes/vars.php and change the line with is_apache to force using apache.

    Am I missing anything? Any ideas of why I’m not able to get permalinks to work? Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Do you use Apache or Nginx as webserver?

    And no, nothing is missing, it’s the default WordPress regex in .htaccess file. Something else is wrong, preventing from good url rewriting.

    WordPress is working well, because as you stated you can access post by default ?postid.

    Definitely your Apache or webserver doesn’t rewrite urls, for some reason.

    Good luck,

    Moderator t-p

    (@t-p)

    whenever I click on any of the links it seems as though I can no longer access any of the pages.

    Any error message?

    Can you share a url of one of the posts that you can “no longer access”

    I’m using apache as stated above.

    But if the apache rewrite isn’t working why would thesmartroadtrip.com/index.php go to thesmartroadtrip.com? Is there a setting somewhere else that might be doing that?

    Also, as you saw above, in my mods-available folder for apache I do have the rewrite mod enabled. I double checked through the apachectl:

    $ apachectl -M
    Loaded Modules:
    ...
     rewrite_module (shared)
    ...

    So it is definitely loaded. Is there another way to check why the rewrite isn’t occuring?

    @tara – I provided a link to my website. Clicking on any post should produce the result. (Any city/state)

    Here is a link as well: link

    @thecliarmo, this is done at DNS level, http://www.thething.com to thething.com. Your apache webserver only catches it, then send its way of working to WordPress, which then use folder based .htaccess in combination with php.

    @digico So then how do I ensure that rewrite is working? It looks like it’s enabled, but for some reason not being utilized (potentially)

    Well like you said, pretty permalinks don’t work but real post id work (aka, yoursite.com/?p=326).

    Can you access your webserver files? (in other terms, can you directly access http.conf and apache files?)

    I was able to find the issue.

    Turned out in my conf file for the site itself I had put

    RewriteEngine On
    RewriteOptions Inherit

    Once I removed those two lines, the other ones were able to work.

    Oh my bad and well done! Inherit is indeed not usual in htacess regex.

    Can be marked [resolved]

    Ah ok. #resolved =D

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Pretty permalinks not working’ is closed to new replies.