wordpress seo friendly url doesn't recognise template - php

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.

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.

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.

Related

how create a custom url in wordpress for page with slash like /se/pagename

I added a page in wordpress. Wordpress created a url like
https://mywebsite.com/page-title
but I want to change this url like https://mywebsite.com/se/page-title
My Permalink Settings shows https://mywebsite.com/sample-post/
and website is already indexed on google so I can't change my paramlink setting.
I also tried with htaccess and also from wordpress add_rewrite_rule() but no result is coming.
Any help how can I do this?
The simplest way to make your page url like www.example.com/se/se1 instead of www.example.com/se1 is to create page se and se1 make as child page of se.
With this option you'll saved your wordpress website permalink structure, you'll in not need to change your other pages redirects for google indexing

how to change basic url into seo friendly url in opencart

I had open the seo url in opencart 2.2.0 but it does not change the basic url into seo friendly url. when ever i click on any it shows the url something like that.
for index link --->
http://homemartz.pk/index.php?route=common/home
product page link-->
http://homemartz.pk/index.php?route=product/product&path=76&product_id=105
and so on....
someone kindly help me to resolve this issue
Go into your admin then settings and store and click on the server tab and tick Yes for use SEO urls.
Next rename htaccess.txt on to .htaccess in the root of the shop.
Make sure all products have a unique seo keyword on the products add/edit page.
To set SEO URLS
Add the SEO keywords to all products and categories (unique
keywords).
To set SEO URLs - Go to System>Settings>Server>Use SEO URLs. You only
get this option on the DEFAULT store.
In your main OpenCart directory, there should be a file called .htaccess.txt. Rename it to .htaccess. If you already have an .htaccess file, Edit the .htaccess file.
RewriteRule ^([^?]*) index.php?route=$1 [L,QSA]
Also, refer link Enable SEO friendly URLs in Opencart
You can follow below link for SEO friendly url in opencart
http://docs.opencart.com/administration/seo/

WordPress subdomain matches to another page using htaccess

I have a WordPress website with many retailer account and all of them can view their profile on their own subdomain.
Like retailer 'aaa' -> aaa.domain.com
I want this aaa.domain.com to match to a page - www.domain.com/page and get the content without changing the url.
Earlier it was working but after auto upgradation of WordPress ver., htaccess got modified all the rules are erased.
please help me with this.
Regards.

Remove "title" word in Main URL in wordpress

How do I remove ?title= in Main Website url in Wordpress
Sample URL:
http://mydomain.com/propertiesdetail?title=this-is-title
Please Help. Thank you.
As far as I can understand you want to have 'nice' URLs.
Wordpress has built-in SEO and user-friendly URL rewrite implementation. All you have to do is check your Permalinks settings in Administration area->Settings.
Select to use not the Default, but Post name (or anything else, you can see all the options). This way all website URLs will be 'beautified' automatically, because Wordpress will rewrite the .htaccess file with the correct code.

How to change URL links that were made by WordPress?

I have a WordPress blog. All the post are currently in this convention:
http://www.myblog.com/blog/?p=1442
Now I'd like to change the URL of all posts like this one:
http://www.gomidjets.com/blog/this-is-my-post
While it's quite easy to apply it by changing the blog settings, the big problem is about the links I've placed
in many external website. I can't change them, and I'd like to map the old links to the new links somehow.
Do you know how to do it - if that's possible at all?
Do you have a better solution?
Thank you very much
Wordpress will map all old URL to new one, in case if you provided all URL in their original shape, such as http://example.com/?page_id=80
The answer is: you don't need to do anything.
I believe what you're looking for can be found in the admin panel.
In the admin panel (http://www.your-wordpress-site.com/wp-admin), go to Settings > Permalinks
Login to the admin panel first,
go for the settings->Permalink Settings
Select the format you want.
If you want change the base url for only some posts then you can edit from database.
Try this Redirection wordpress plugin to redirect your old url to your new url.
The URL's should resolve fine because the original URL you're using is the permalink one to my knowledge. If you're wanting end users to be redirected to this url, that's a bit harder.
That aside, I couldn't find any plugins that already did this. What you want to do is check the current URL against the wordpress function get_permalink() and if it doesn't match, redirect to the current permalink URL.

Categories