WordPress.org

Ready to get started?Download WordPress

Forums

How to hide page link in url. (2 posts)

  1. tahirkheli
    Member
    Posted 3 years ago #

    Hello

    I have a problem. See the below url:

    http://beta.gpfflaw.com/index.php/contact-spanish-version/
    index.php part is showing with every page in the url.i want to hide this index.php in the url.

    can you please tell me how will i do it?

    Regard

  2. hpguru
    Member
    Posted 3 years ago #

    Paste to .htaccess file on root:

    <IfModule mod_rewrite.c>
    RewriteCond %{HTTP_HOST} ^www\.yoursite\.net$ [NC]
    RewriteRule ^(.*)$ http://yoursite.net/$1 [R=301,L]
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

Topic Closed

This topic has been closed to new replies.

About this Topic