pagination not working on SEO URls opencart 2.1.x - php

Hi am facing an issue with pagination on Opencart when SEO URLs in setting is enabled.
I am using oepncart v2.1.x. below option is used for SEO
And to make URLs SEO i make entry for product SEO URL while adding product like as below
But with this pagination is not working at all. I am getting URL directly as
http://example.com/dfgfd-dfgfdg
and when i disable SEO option then i get URL as
http://example.com/index.php?route=product/category&path=61_71&page=1
It is woking when SEO is disabled. Any ideas please?
I have installed extenstion super_seo.xml by orestius to make other URLs SEO like registration and login URLs.

I am posting this as answer as it freaked me to hell from last 2-3 days. I have figured out a code and can be made as below as a change:
Only tested on OC 2.1.x
find catalog/controller/common/seo_url.php
Use code mentioned here Here {if link does not work in future, feel free to mail me for same}
open index.php in root folder and make entry
$controller->addPreAction(new Action('common/seo_url'));
Go to your DB and find table url_alias and make entry in table as in below image
By following above 4 steps everything works like charm and Pagination works perfectly now even with SEO URLs.
Eg. Url will look like as below:
http://example.com/index.php?route=account/logout
will become http://example.com/logout
and Pagination will be
http://example.com/example-collection?page=2

Related

opencart seo friendly url only works for some pages

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.

Custom Permalink with Page Name Wordpress

I have looked all over the place and can't figure out how to get this to work.
I want my urls for blog posts to look like this: "www.website.com/my-page/category-name/blog-post-title"
The issue I am having is that I have a page called "my-page".
So I have a page "www.website.com/my-page/" which is just a standard wordpress page, but I want the url for the blog post to look like it is under that page.
Here is what I have for the permalink so far:
/my-page/%category%/%postname%/
But this doesn't work and gets a 404 error when opening a blog post.
At this point I don't believe it can be fixed through the wordpress gui, so if anyone has any recommendations, it would be appreciated.
Thanks!
Edit: I wanted to add that the permalink works fine if I remove "/my-page" or if I simply modify it so it does not match the page.
First of all you should not use the category in front of your permalinks as it leads to bad performance (and some posts may have multiple categories): http://ottopress.com/2010/category-in-permalinks-considered-harmful/
The second thing is - it should work. I tried with a fresh installation on WordPress and I get the correct results.
Did you flush rewrite rules / save the new permalink structure?
Did you publish a post?
Is your server correctly configured to use permalinks?
Third possibility - if your permalink structure does not work for some reason you can define a custom permalink structure:
https://codex.wordpress.org/Rewrite_API

wordpress seo friendly url doesn't recognise template

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.

clean urls in wordpress

Im using page.php in wordpress for making a dynamic page.
Right now Im using photography/?cat=portraits
But I want photography/portraits
Im currently grabbing whatever is in my query string (cat=portraits) and only showing that content.
Where at in wordpress can I set up the routes or permalinks to be formated more simple?
Permalinks can be found under the setting tab from your WordPress admin interface
Follow this tutorial...
http://www.creativecitrus.com/wordpress-development/how-to-get-pretty-urls-in-wordpress
Or theres the Pretty URL plugin....but Ive never used that
http://wordpress.org/plugins/pretty-url/
Login wp-admin
Settings -> permalinks and choose custom structure place this sting and save it
/%category%/%postname%
If you have any problem in saving permalink please copy paste it in htaccess.
Or make it write permission for period.

Joomla SEO Friendly URL Problem

In my current Joomla Project, I set the SEO friendly in URL in global configuration in Joomla 1.5. Everything worked fine except the search. When I search something, the url shows as old one (not like seo friendly url) and because of that, I had a banner image in search result page, and it's not showing now. Does anyone know how to fix the seo friendly url in Joomla Search. Please it kinda urgent.
Thanks
Most likely you need to make a menu item that links to the Joomla search page. Otherwise there is no itemid to associate the search results to. If you don't already have a hidden menu, simply create a new menu and don't put it in a module, then add a link to the default search page. That should solve your problem.

Categories