• So basically I want to change my permalink structure too: https://www.joellepoulos.com/sample-post/ (it’s current on https://www.joellepoulos.com/?p=123 and works fine) when I try to change it, it says that my .htacess file isn’t writeable (I have attempted to make it writeable and it hasn’t worked either). I am capable of editing my .htacess file… it is currently:

    Options +FollowSymlinks
    RewriteEngine on

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

    so what is it supposed to be if I want it to have that permalink structure.. I tried /%postname%/index.php and /postname/index.php and even just /postname/ nothing works (if you could tell me how to make my .htacess file writable even better!)

Viewing 15 replies - 1 through 15 (of 16 total)
  • Your RewriteBase is incorrect. Try using:

    # 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
    Thread Starter joellepoulos

    (@joellepoulos)

    I changed updated the file, changed the wordpress permalink structure and it still doesn’t work…

    Check with your hosts that mod_rewrite is running on your server.

    Try to delete your htaccess file, refresh the page. Re-create the .htaccess file, and add

    # 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

    If that doesn’t work, confirm that the mod_rewrite module is active on your site.

    Thread Starter joellepoulos

    (@joellepoulos)

    How can I check that my mod_rewrite is running on my server?

    Thread Starter joellepoulos

    (@joellepoulos)

    how and where do I put that?

    Thread Starter joellepoulos

    (@joellepoulos)

    @evan I did the refreshing and adding a new file and the page still displays “page cannot be found” as soon as I change the permalink structure…

    Sorry I got rid of it as I wasn’t sure it would actually work. I did a test, add this to your functions.php file and reload the site on the front end. It will echo enabled modules in the head section.

    function test_enabled_modules() {
    	$enabled_modules = apache_get_modules();
    	print_r($enabled_modules);
    }
    add_action('wp_head','test_enabled_modules');
    Thread Starter joellepoulos

    (@joellepoulos)

    I did right at the top of it, and see for yourself: https://joellepoulos.com/

    i don’t think i put it in the right place….

    No it doesn’t look like you did place it in the right place. You just need to add it to the bottom of your functions.php file, right above the last ?>

    It looks like you placed it in your header.php file.

    Thread Starter joellepoulos

    (@joellepoulos)

    I moved it to near the bottom but there wasn’t /> anywhere near the bottom…. it starts with <?php but I couldn’t find the end of that anywhere…

    Thread Starter joellepoulos

    (@joellepoulos)

    I just did a search on the file and “?>” doesn’t exist on it anywhere…

    hmm, I see that your getting an error now:
    Fatal error: Call to undefined function apache_get_modules() in /home/joellepo/public_html/wp-content/themes/fluxus 2/fluxus/functions.php on line 256

    which usually means theres a syntax error. Did you forget the { after function()?

    Instead of apache_get_modules() you could try phpinfo();

    function test_php_info() {
      phpinfo();
    }
    
    add_action('wp_head','test_php_info');

    It could be that your not running on an apache server. My last suggestion would be to reach out to your hosting provider and let them know that you need mod_rewrite enabled.

    Thread Starter joellepoulos

    (@joellepoulos)

    No it’s all in there, I’ve removed it now… Okay and what would that do? Would it resolve the problem?

    I just did a search on the file and “?>” doesn’t exist on it anywhere…

    The closing ?> is often deliberately omitted at the end of files because it (a) isn’t necessary since the file is ending anyway and (b) reduces the risk of “headers already sent” warnings.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Permalinks Not Working!!’ is closed to new replies.