WordPress.org

Ready to get started?Download WordPress

Forums

Remove index.php from url - Hosted in Sub directory - WordPress (4 posts)

  1. jitheshkt
    Member
    Posted 1 year ago #

    These are my server configuration :

    Operating System : Linux (64 Bit)
    Server : Apache/2.2
    PHP Version : 5.3.14

    This is a production server and it runs more than 600+ website. Client provided me a ftp account which have limited access to a particular directory.

    This is the directory path

    /www.mastersite.com/web/content/**mysite**

    I uploaded all my wordpress site to mysite directory as per the instruction of my client. Now he can access the site by the below url :

    http://www.mastersite.com/mysite

    Now my problem is all about permalinks of wordpress. Usually i use /%postname%/ in custom permalinks structure which gives the result like this :

    http://www.mastersite.com/mysite/**postname**

    But unfortunatly this settings giving me 404 Not found error. :(

    Spending few hours to get ride of this issue noticed something and sharing along with this question.

    1. Site works when i use /index.php/%postname%/ instead of /%postname%/. ie, result is like http://www.mastersite.com/mysite/**index.php**/**postname**

    2. WordPress not generating its own .htaccess file

    Simply, my problem is that "index.php". How to get ride of that.?

  2. ClaytonJames
    Member
    Posted 1 year ago #

    WordPress not generating its own .htaccess file

    .htaccess is hidden by default. If it's there but hidden, .htaccess may simply be denying wordpress permission to write to it. If it's really not there, you can create your own blank .htaccess file in the wordpress root directory - don't forget, this file extension is hidden to ftp clients by default. You need to turn on "show hidden files" in your ftp client to expose it.

    Give .htaccess permissions so wordpress can write to it, then go to your dashboard and set your custom permalinks to /%postname%/ and save the changes. If there is no error message at the bottom of the permalinks page in the dashboard, you should see some success. If so, change the permissions on .htaccess back to the secure setting (0644 maybe?) for your server.

    If that doesn't work, have your hosting service support group work with you to make sure that the AllowOverride directive is properly configured for your site virtual container. They should be able to either walk you through that, or just do it for you.

  3. jitheshkt
    Member
    Posted 1 year ago #

    Thanks :)
    Creating a dummy .htaccess file did the job. Thanks alot bro :)

  4. ClaytonJames
    Member
    Posted 1 year ago #

    You're welcome.

Topic Closed

This topic has been closed to new replies.

About this Topic