WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks clash with Directory Name (5 posts)

  1. currentaffairs
    Member
    Posted 5 years ago #

    Hi,

    There's a problem with my Permalinks.

    This is my blog: http://thecurrentaffairs.com/ipl/

    When I Post something starting with "IPL" it doesn't work with Permalinks and shows "Not Found".

    Please have a look and help me on this.

    Thanks and Regards.

  2. 3v1l5w1n
    Member
    Posted 5 years ago #

    the problem is the .htaccess mod-rewrite that sends the "data" from the permalink to index.php works only if there is no actual directory with that name ...

    try the following, open the .htaccess file in your blog's root directory ... it should look like this:

    rewriteEngine on
    # BEGIN WordPress 
    
    # requested URL_path does not resolve to existing file
    rewriteCond %{REQUEST_FILENAME} !-f
    # and requested URL-path does not resolve to existing directory
    rewriteCond %{REQUEST_FILENAME} !-d
    # rewrite the request to WordPress
    rewriterule . /index.php [L]
    # END WordPress

    and add this on a new line right after "# BEGIN WordPress "

    # If requested URL-path does start with "/ipl/"
    rewriteCond %{REQUEST_URI} ^/ipl(.*)$
    # rewrite the request to WordPress
    rewriterule . /index.php [L]
  3. currentaffairs
    Member
    Posted 5 years ago #

    I donot have any .htaccess file in the directory. What should I do now?

  4. 3v1l5w1n
    Member
    Posted 5 years ago #

    Every wordpress installation has one, probably your ftp client doesn't show system protected files ... try using the Robots Meta plugin http://wordpress.org/extend/plugins/robots-meta/. It should let you edit the .htaccess file from within the wordpress dashboard

  5. currentaffairs
    Member
    Posted 5 years ago #

    Ok, this is how the .htaccess file looks

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /cms/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /cms/index.php [L]
    </IfModule>

    # END WordPress

    What should be the changes?

Topic Closed

This topic has been closed to new replies.

About this Topic