WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to remove index.php from URLs (2 posts)

  1. iversoncru
    Member
    Posted 1 year ago #

    Hi there,
    i have just migrated a website to a new hosting, Linux one, and in every permalink i have .../index.php/...
    How do i get rid of it?

    I have tried this:
    - going to Settings -> Permalinks and change to Default and then back to Post name
    - created an .htaccess file with this 3 different codes

    # BEGIN WordPress
    RewriteEngine On
    RewriteCond %{THE_REQUEST} !^POST
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]
    # END WordPress
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /fineblack/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /fineblack/index.php [L]
    </IfModule>
    
    # END WordPress
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    this is the website http://www.fineblackline.com

    I just want to have 'http://www.fineblackline.com/about-us' instead of 'http://www.fineblackline.com/index.php/about-us' U.U
    can anyone help?
    thanks in advance

  2. iversoncru
    Member
    Posted 1 year ago #

    well, it was a different problem in the end...
    The new hosting, with Namesco, does not use Apache, so the '.htaccess' file was useless...
    The support team told me that the equivalent file to '.htaccess' for their Zeus (ein?) server was rewrite.script, and they provided me with the equivalent code as well.
    Even after doing this, i can still see ".../index.php/..." in the middle of the URLs, and in the section 'Settings -> Permalinks', except for the Default and Custom Structure of permalinks.
    The support team told me that the only way to get rid of the ".../index.php/..." was either use the Default Structure or the Custom Structure for the permalinks. Then so be it.
    i hope this can help somehow whenever.

Topic Closed

This topic has been closed to new replies.

About this Topic