wordpress seo friendly url doesn't recognise template

129 views Asked by At

I have a website where there are profiles. I have changed the .htaccess so it give me a nice URL back, for example.

SEO unfriendly URL:

www.domain.com/index.php?page_id=216&acctype=trainer&stname=name

of trainer (with - instead of spaces).

Now I managed to get it like the following:

www.domain.com/profiel/trainer/name-of-trainer

My .htaccess looks like this:

RewriteRule ^profiel/([^/]*)/([^/]*)$ index.php?page_id=216&acctype=$1&stname=$2 [L]

All I get is that the page is not found.

I have a page in WordPress (profiel) and have a template linked to that page, could it be that the acctype (type of account), is making it that the template is not being found?

Hope that the explanation is clear, if not, please ask.

Hope some one can help.

I have setup the permalinks correctly, because the url is showing, it only doesn't show the correct template, it should show more detailed info about that specific user. I am wondering what is going wrong, have no clue at this tried.

2

There are 2 answers

0
Deep Kakkar On

I don't think you need to change in your .htaccess file to make the URL SEO friendly. Just login the admin panel

Settings > Permalink Settings > Select Post Name from the given options

Using this way you can make URL SEO friendly in WordPress.

0
Lal krishnan S L On

The wordpress post and page urls are stored into database too. When you change your url rewrite on .htaccess that changes base redirection only. You need to change permalink on Settings > Permalink Settings > Select your url pattern By using this the wordpress automatically change .htaccess and all post url and page url on database to.