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/
Related
I'm working on my first project with opencart.
I activated seo friendly urls in setting. Some pages such as about-us are fine. but seo friendly urls don't work for checkout, cart, register,... pages.
For example http://onelight.ir/about-us is ok, but http://onelight.ir/register shows an 404 page and I must use the long url.
I checked my database. There's no record for register on oc_url_alias table but there's a row for about-us keyword, with value information_id=4 for query.
I checked catalog/controller/common path. There's no seo_url.php file there if that helps.
my opencart version: 2.3.0.2
Thanks a lot for your time, and sorry for my poor english.
After struggling a lot this is how it works:
I used this answer and this link. BUT seo_url.php file is in catalog/controller/startup directory.
Currently, I have URL like
/recipes-detail/?recipe=(Slug of recipe)
How Can I change this to
/recipes-detail/(Slug of recipe)
Currently, I am fetching the recipe custom plugin.
Change Permalink Settings to Post name
You can add to the .htaccess file a rewrite mode
RewriteRule ^recipes-detail/[a-z0-9]+(?:-[a-z0-9]+)*$/ ./recipes-detail/?recipe=$1
Now if you use this address yourwebsite.com/recipes-detail/cake-of-chocolate will work exactly as you will be doing yourwebsite.com/recipes-detail/?recipe=cake-of-chocolate
So you can now build your urls with the friendly option.
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.
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.
I'm running a wordpress installation on the root dir of my website test.com
Wordpress is using url's like: test.com/information/ and I also added some custom parameters like: test.com/information/?about=product
I tried to use the mod-rewrite generator at http://www.generateit.net/mod-rewrite/ to change my custom urls to test.com/information/about/product but keep receiving a wordpress 404 error.
Is there a solution to my problem?
All answers wrong. Login to admin area. On the left menu, under settings find permalinks. You can choose or add proper settings there.
I agree with #borayeris - Wordpress has it's own permalinks page under Settings - use that.
If you are already using pretty permalinks, make an about page then make it the parent page of all your product pages.
Or use the rule:
RewriteRule ^information/about/([^/]+)/?$ information/?about=$1 [L,NC]