Prestashop Friendly URL rules - url-rewriting

How could I write the rules to convert those links to the friendly ones after the , the produced friendly URL below show broken links
This URL
http://www.elektrojo.com/index.php?id_post=2&fc=module&module=nextblog&controller=nbpost
To this friendly one
http://www.elektrojo.com/blog/2-second-blog
Also These
http://www.elektrojo.com/index.php?fc=module&module=nextblog&controller=nblog
http://www.elektrojo.com/blog
http://www.elektrojo.com/index.php?id_collection=1&fc=module&module=nextblog&controller=nbcollection
http://www.elektrojo.com/blog/collection/1-test
http://www.elektrojo.com/index.php?year=2016&month=5&fc=module&module=nextblog&controller=nbarchive
http://www.elektrojo.com/blog/archive/2016-5

It seems like you have an empty directory "/blog" in root of your domain just remove or rename that empty directory and friendly link to blog will start working

Related

The requested page can't be found

I'm a new beginner to Joomla. I'm trying to build a website with a sub domain of joomla (free sub domain). After successfully setting up and installing the database plus other components according to several beginners' tutorials, where I successfully upload several templates, I try to test the link of my website but all I get is this error message:
The requested page can't be found.
An error has occurred while processing your request.
You may not be able to visit this page because of:
an out-of-date bookmark/favourite
a mistyped address
a search engine that has an out-of-date listing for this site
you have no access to this page
Search
You may wish to search the site or visit the home page.
Search ...
Search ...
Home Page
If difficulties persist, please contact the System Administrator of this site and report the error below.
404 Article not found
How can I really go about solving this issue because after intensive research I have found out that this error message is very common for beginners when it comes to Joomla.
Some Suggestions:
SEF URLS
Try using a non-SEF URL to access an article to see if that works.
For example, check in Content -> Articles for a valid published article ID (the article IDs are in the last column at the right hand side of the page) and access the page using a URL like this:
http://[your-domain-name].com/index.php?option=com_content&view=article&id=xx
where xx is the article ID.
If this works, then your problem has something to do with SEF URLs or URL Rewriting.
You can temporarily disable SEF URLs and URL Rewriting in the Global Configuration.
.htaccess
A badly configured .htaccess file could cause this issue.
Assuming the .htaccess file exists in the root folder of your website (e.g. in the /public_html folder) then try copying .htaccess to .htaccess.old as a backup and reset the .htaccess file to the default settings by copying htaccess.txt to .htaccess.
htaccess.txt should also be found in the root folder of your website as part of a normal Joomla install.
Test whether this fixes the issue.
Third Party Extensions
Try disabling any SEF related third party extensions.

How to remove /blog from url in Joomla

I created a Category Blog on my Joomla site but there's a problem. Joomla is adding /blog automatically to urls and as a result, images aren't displayed since blog/images/ doesn't exist. Is there a way to either remove blog/ from urls or correct image links to display /images instead of /blog/images? These are the links:
http://www.gambitchessacademy.com/blog
http://www.gambitchessacademy.com/blog/10-using-time-efficiently-during-a-tournament-game
Thanks very much.
Fist, your real problem is about Relative VS Absolute URLs. See http://kb.iu.edu/data/abwp.html for example.
For example a javascript file on js/jquery.js is a relative URL. If you are on site.com/blog/article.html it will try http://example.com/blog/js/jquery.js. But if you use /js/jquery.js or http://example.com/js/jquery.js you will have your real problem solved.
Note the "/" at start of paths. They make a lot of diference.

Joomla .htm url mapping to pages in CMS

I inherited a Joomla site that has a set up I'm not familiar with. The url of pages on the site are like
http://hufboxing.com/about.htm
http://hufboxing.com/training.htm
http://hufboxing.com/schedule.htm
I looked in the .htaccess file and do not see any rules that map .htm urls to the Joomla query string urls.
In the CMs, on each article are url alias. The corresponding URL alias to each of the urls above are:
http://hufboxing.com/about-us
http://hufboxing.com/team-training
http://hufboxing.com/the-gym-schedule
However, going to any of these alias gives a 404 page. Even if I attach a .htm extension to these urls, it gives 404 page.
Where do I go in Joomla to add new pages to the site and add new .htm urls?
Here is the website:
http://www.hufboxing.com
That is normal. They are based on your article and menu aliases. Joomla uses a database to store the text so you won't find pages. How do you want the urls to look? Also what version? To add pages login to administrator and go to create article. Then you may want to go to the menu manager and link. I recommend you review the beginner docs at http://docs.joomla.org.

Custom 404 error page

I am trying to create a custom 404 error page. The instructions that I found say to create a .htaccess empty text document when I do that Windows tells me to put a file name on it. Can someone tell what I need to do or point me to a tutorial for making custom 404 error pages?
It seems like you're just trying to make the page itself (according to the commentary on the question). To create the page just make a file of any name .html or whatever format you wish to use (.php for php for example) and write it up using your language of choice. Once you create the 404 page you need to specify it's location, assuming you're uploading this to a site of yours. This should be editable in a control panel like CPanel for example. If not, you'll need to edit your apache config to specify it's location or make and upload an .htaccess file to specify it's location.
The problem is that Windows Explorer doesn't let you create file with name .htaccess. Instead of creating the file with Windows Explorer, open a Notepad and save the file with name .htaccess. Don't forget to change "Save as type" to "All Files (*.*)", otherwise it will add .txt extension to it.
Assuming you are using Apache and .htaccess is not activated you use
# this is in .htaccess in the root directory of the webspace
ErrorDocument 404 /url/to/error/page.html

Use relative urls in Joomla menus

I have joomla site which is located in mydomain.com/somefolder/otherfolder/TheSite. I have created a rewrite rule to invisibly redirect all requests beginning with mydomain.com/TheSite to this url. It works fine.
My problem is that the urls that my menuitems point to are the old mydomain/somefolder/otherfolder/TheSite/stuff. If they were relative urls, it would work.
My question: How can I force joomla to use relative urls for the menuitems, or use the urls I explicitly specify?
Thanks in advance
Probably the easiest way to make Joomla produce only relative URLs is to edit the core method "_" of the JRoute class:
JRoute::_()
This is called by Joomla application and extensions to generate consistent URLs.
It is found in:
libraries/joomla/methods.php
Making Joomla spit out relative URLs probably isn't the best way to do it. Making the absolute URLs point correctly would.

Resources