I have a wordpress site that is set to www.mydomainsample.com, however when it opens other link for instance the service page, it will show localhost/wordpress/index.php/services.

Any idea how I can change to www.mydomainsample.com/services when I open the service page. Thanks and have great day :)

  • That means you have hard-coded urls or if you migrate from localhost to production you haven't chagne the siteurl and home WordPress options. Also a modified htacess could be possible. Please provide more information.
    – Laxmana
    Commented May 15, 2017 at 9:34

1 Answer 1


1) add or edit the .htaccess file, it should be:

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

2) Go to admin panel -> settings -> Permalink and select Post name, if this does not fix, then click on Custom Structure and write /%postname%/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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