Page 1 of 1

One url for one article

Posted: Mon Apr 16, 2018 2:07 am
by networkingstudy
Hi All,
I have latestest version of Joomla, where i want one URL for one article, please suggest how to do that.

Example, below is my two url which both have similar/same article but in two diffent url.

I want URL -

Code: Select all

https://[ redacted ]/index.php/networking/26-error-0x800f0906-“windows-couldn-t-connect-to-the-internet.html
But you can also access with below URL which i don't want, because it is not SEO friendly.

Code: Select all

https://[ redacted ]/index.php/networking/26-error-0x800f0906-“windows-couldn-t-connect-to-the-internet

Re: One url for one article

Posted: Mon Apr 16, 2018 9:38 pm
by AMurray
The two links you provide don't show any difference, they are both the SEO-friendly format.

I may be confused by your question but guessing you mean you don't want the /?com_content=303&whatever=65 kind of URL and instead want the /this-is-your-alias bit for your URLs? I visited your site, and don't see any of the first kind, all URL's seem to be using the SEO-friendly format.

You're saying you can access the site by either the non-SEO or SEO friendly URL's - I would say that's normal behaviour since the non-SEO URL is the real URL that the system needs to generate the pages, and the other is simply as you have said, for SEO purposes, and for people (not machines) to identify the page URL in plain-English.

Given Joomla is dynamic, it's not loading actual physical HTML files, everything is generated from the database on the fly when you request each and every page.

Your site will still be crawled by search engines, and indexed based on the SEO URLs. So I don't see your concern.

Can you advise if this response has missed the point of your question - and can you clarify what you're asking if so.

Re: One url for one article

Posted: Tue Apr 17, 2018 4:40 pm
by networkingstudy
Thank your for your reply and time.

1) As i mentioned above, I want only one URL for one article. i want user/crawl can only access the url end of .html.

2) in the same way, Search engines see your

Code: Select all

https://www.youritadmin.com
and

Code: Select all

https://www.youritadmin.com/index.php
as different pages.
Because both URL is accessible but content is same.

Please help on this. So that i can use only one url for one content.

Re: One url for one article

Posted: Tue Apr 17, 2018 9:07 pm
by AMurray
That's beyond my expertise, sorry.

Again, I don't really see why search engines would treat these differently or as duplicate content etc (I would welcome an explanation to why that is the case).


There's an option in global configuration (same section as the SEO-friendly settings) to add the file suffix (.html) - but as far as I know it doesn't matter, since it's the same page - whether it has .html or not.
suffix_to_url.PNG
Note this doesn't make pages in your site actual physical html pages on the server.

Re: One url for one article

Posted: Tue Apr 17, 2018 9:24 pm
by AMurray
Go back over the SEO settings you use, and experiment

My site settings for SEO are:

URL Rewriting - YES
Search Engine Friendly URLS - YES
Add Suffix to URL - YES

Check your settings, and save, then refresh the page. (take note of the instruction concerning the .htaccess file).

Your URLs should then show as http://www.yoursite.com/section/this-is-the-page.html

The "section" and "this-is-your-page" (as examples) are derived from elements such as menu and sub-menu items, and article titles. etc.

Ideally you would probably want, (using your example URL):

Code: Select all

https://www.youritadmin.com/networking/26-error-0x800f0906-“windows-couldn-t-connect-to-the-internet.html
(drop the 'index.php' from the URL).

I don't know if this will help ;) ???

Re: One url for one article

Posted: Sat May 05, 2018 4:27 pm
by networkingstudy
Thanks for your reply AMurray,

I have done changes as you suggested, But still i am able top access the url without .html.

I want to access should only to .html url not without html url.

Re: One url for one article

Posted: Mon May 07, 2018 4:43 am
by nitsinc
Use this htaccess 301 to redirect all non html urls to .html

Code: Select all

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\..+$
RewriteRule ^(.*)$ /$1.html [R=301,L]