• Hi,

    I’m quite new to WordPress and I’m looking at making my clients website more SEO friendly. The site has a search results page and I want the links on this page not to be in the format:

    https://www.mysite.com/details.php?id=345
    but rather
    https://www.mysite.com/details/this-is-my-article

    Current my .htaccess file allows me to have https://www.mysite.com/details/ but if I put an article name after this url it just relocates to the homepage.

    I know I need to modify my WordPress .htaccess file to acheive this but I’m not sure how, heres my .htaccess file:

    RewriteEngine On
    RewriteBase /

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Could someone point me in the right direction on how to achieve this, i.e what I need to add to the file?

    Regards,
    Colin.

  • The topic ‘.htaccess RewriteRules’ is closed to new replies.