Suddenly new URLs with "table/"? - url

I'm running a simple site based on Joomla. The SEF URLs are defined by SH404SEF and look like https://[domain]/[category]/[sub category]/[article title alias].html. In some cases there is a 1-to-1 relationship between category and article but in some cases one category has several articles.
Suddenly I have URLs requested following https://[domain]/table/[category]/[sub category]/. Not only does these new URLs in some cases create 404s, they also view my articles in the wrong way and when there is not a 1-to-1 relationship between category and article the link adds several articles on one page.
The correct non-SEF URL ends with &view=article and the new, uncorrect non-SEF URL ends with &view=category. I have no table/ in my correct URLs, neither in any internal link, in the articles' html code, in menu items nor in my sitemap.xml. I've discussed this with the few extension providers I am using and none of them see their extension as doing this request new.
Is there any way to find out what is making these requests?
I cannot make a redirect for these URLs since all of them do not
correspond to one article, but several. Can you see any risk with
making a rewrite rule that puts a 410 on all URLs that starts with
table/?

This is actually a misconfiugration in sh404SEF. Here's what to do:
Login to the backend of your Joomla site
Go to the sh404SEF configuration
Set the field "Insert Content Table Name" to "No"
Flush all URLs and clear your Joomla cache
This should do it.

Related

Umbraco This document is published but its url would collide with content (error)

I am new to Umbraco CMS. I have every thing setup but get the following error. (Highlighted in red.)
How do I set the URLs in Umbraco. Or fix them?
The alias (short URL) of a page is defined by the name that you give the page in the input bar at the top of the page:
If you have two pages both named Weddings, then they will conflict; you can only access one view when visiting /weddings/.
In order to correct this, simply come up with unique names for your pages, such as Indoor Weddings and Outdoor Weddings (for example).
While these page names are mostly for organisation within the Umbraco CMS, they will be reflected in in URL, so I would recommend choosing something semantic.
Note that you can also set the page's URL manually with the UmbracoUrlName (and UmbracoUrlAlias) routing property if need be.

Change structure of automaticly generated urls in prestashop

I have this website of my client made by someone in prestashop which has search input, and after searching for an item it will display a list of matching products, each linking to its page with a url looking like this:
www.website.com/category/full-product-name.html?search_query=search_phrase&results=2
Where a regular url of the product page looks like this:
www.website.com/category/full-product-name.html
The problem is now the google indexes the duplicated urls as separate pages.
I've never worked with prestashop before but I've looked into the template files and found something what I'd assume is file responsible for generating the content with line responsible for the link looking like this:
<a class="product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
Now as I don't know much about prestashop I don't want to blindly change stuff. How could I change it to have the links from the search results have the same structure as the normal product page urls?
Well I don't know what's the point of allowing search engines indexing search pages but the problem is here. For whatever reason the developers decided to include query string into search result links.
You can create an override of search controller (or custom search module would be even better) and throw that line out and you should have normal product links.

ASP.NET MVC Specify Category/Path outside of URL Routing

I have a problem to make a decision for putting Category/Path on URL Routing. Assume I have some products in my sample Web Application those attached to some categories. For example:
Book1 Attached to -> Category1 | Category2
Book2 Attached to -> Category1 | Category2 | Category3
Book3 Attached to -> Category2 | Category3
And defined routing map for products is:
url: "{controller}/{action}/{languageCode}/{category}/{product}"
defaults: new { controller = "Home", action = "ViewItem" }
So possible routing for Book1 are:
[Domain Name]/Home/ViewItem/en-US/Category1/Book1
[Domain Name]/Home/ViewItem/en-US/Category2/Book1
And possible routing for Book2 are:
[Domain Name]/Home/ViewItem/en-US/Category1/Book2
[Domain Name]/Home/ViewItem/en-US/Category2/Book2
[Domain Name]/Home/ViewItem/en-US/Category3/Book2
I want to save and know current category but have single unique URL for each product(For search engine tracking and sharing URLs purpose). I think about using Session Variable or ViewBag even Cookie, But each of them has own limitations and cons. For example using cookies may cause some troubles: if set expiration time too small, it may lost current path when user pausing on some pages and if set it too long, may lead user to old browsing path even user requested for home page in new opening browser because of existing cookie (Except that, I'v some experiences with cookies and I believe that is not working precisely all times), About Session and ViewBag I don't know if using them is the best idea, So can anyone share tested solution or good idea? I will appreciate that.
You should have the page mywebsite.com/product1 (the canonical version of the URL). Including all the versions of the URL won't help. Likely, it will just confuse Google and may lead to Google ignoring certain URLs
Even if you put in the canonical version and have the rel canonical tag on your pages, Google may still choose to treat another version of the URL as canonical.
Ideally, then, I'd solve the real problem here and just have one version of the product URL on your site (have the versions with the category in the URL redirect to the version of the URL with no category in the URL). That way you don't even have to worry about all the issues duplicate content may cause.
I suspect this isn’t a routing problem, rather an architectural issue. I think that the “language code” and “category” should be an attribute of the Book object, rather than being a part of the route.
You would then have URLs like:
{domain}/{controller}/book/id
And for “category” specific or “language code” specific views, you could have URLs like:
{domain}/{controller}/search?languageCode=enUS&category=1
This would still be perfectly RESTful and in my opinion, much simpler as well.

Maintain parameter info in the request path for all pages instead of the subdomain

I seek some guidedence here ... ( I'm not sure if this is the best title )
At the moment I prepend a "server name" to the url like this:
server10.example.com
This works fine, except that I need to handle all the subdomains on the IIS and I'm not sure google are happy about jumping around from sub to sub to sub, when it seems the links to the other servers.
I'm kind a hoping for a nice way to archive this wioth asp.net mvc.
Most pages are related to a "server" ... there are however a few info pages, contact, home that dont really need a valid "server" name ... but could just be "na" for not available, but the name need to be maintained, if there is already a selected server, when a user are keeps browsing the site. This needs to be as transparent as possible when I need to create the links to the diffenrent pages.
I could extend the Html Action() extensien to automatically add the selected "server" from the previusly request to the page.
In the format:
/{serverParameter}/{controller}/{action}/{parameterInfo}
And if no server is selected, just add "na" as the {server} placeholder.
I'm not sure if more information is needed, but please let me know if ...
I tired of extracting the selected server from the domain part and the other way also seems better, I just can't think of a good way to structure this ...
Updated
90% of all the pages are about a server that the user select at some point. Could be server10, server9, server20 ... just a name. I want to maintain that information across all pages, after the users has selected it or else I just want it to be f.ex: "empty".
I mostly looking for an easy way of doing this or an alternative ... atm I'm prepending the serverParamter to the url so it ends up being: "serverParameter.example.com".
I want to end up with something like
http://example.com/{server}/{controller}/{action}
instread of
http://{server}.example.com/{controller}/{action}
If I understand your question correctly, you just wish to group different collections of content together above the controller/action level. If that's the case, have you considered using ASP.NET MVC areas?
Just right-click on your project, and choose Add -> Area.... Give it a name (what you're calling "server"), and then you can add content, your own controllers, actions, etc. Under this area. You will automatically be able to access it via /AreaName/Controller/Action/etc.
I went with the already impemented routing in ASP.NET MVC.
{server}/{controller}/{action}
When creating the links it takes the set value for {server} and places the value when generating URL's, so I only need to supply controller and action in the #Html.Action helper method ... this could not have been more easy.
I'm not sure why I did not think about this. One just gotta love routing.

URL Structure best practice / standard

I'm building a site that has items, with each item having a page, for example:
website.com/book/123
website.com/film/456
website.com/game/789
Each item can have multiple sub (and sub-sub, sub-sub-sub) pages, for example a book could have a blurb, a film could have a gallery and a game could also have a gallery.
My question is, does any sort of standard or best practice exist around structuring the URLs for pages associated with an item? For example:
website.com/film/456/gallery
Where the sub page comes after the item, or:
website.com/film/gallery/456/
where the item is the very last part of the URL.
Does anyone have any information on why which approach is best or if any web standard exists? It seems an obvious thing but I'm struggling to decide, I can think of pros and cons for each approach -- although I'm leaning towards the former option because it means the following user path would match the URL:
load website.com -> click "films" (website.com/films)-> click "a film" (website.com/film/123) -> click gallery (website.com/film/123/gallery)
but something about it seems... off, inconsistent maybe.
You are correct that the former URL is "better" and is more widely deployed. I don't think you would find this documented in any standard; it is rather more of a convention. Most articles and books covering REST do it that way.
The reason for this is, as you say, that the path components in the URL match the structure of resources and sub-resources. In particular, all of the following should be valid URLs:
website.com/
website.com/books
website.com/books/123
In particular, note that it is books/123, not book/123 like you have. I have seen the singular but IMHO the plural is better.
For the URL /books
a GET gets all books, but you can restrict the books with query parameters, e.g. /books?author=alice
a POST adds a new book (with a server-generated id).
For the URL /books/123
a GET gets that particular book
a PUT replaces the book with that id (or adds a book with that client-generated id)
Now if a book has blurbs and the blurbs are unique only to a particular book then you will add the following URLs:
website.com/books/123/blurbs
website.com/books/123/blurbs/72
You can do the same for films and galleries, provided each gallery belonged to a single film. But if galleries existed for multiple films, then you would make /galleries a top-level URL. Navigating from a film to a gallery would still be fine. You wouldn't have a structured URL. You would instead get all galleries containing pictures from film 456 via a GET to
website.com/galleries?film=456
The general rule is that if you have an ownership relation for the subresources you can use structured urls, but if there is a looser relationship among top-level items, query parameters are fine. Don't fall into the common misconception that RESTful URLs don't have query parameters; they do. :)
Now finally, to directly answer your question: website.com/films/galleries/456 is not a good URL IMHO because `website.com/films/galleries/ is not very useful. In fact I think it is rather ugly. What would it mean? All galleries? If so, it should be website.com/galleries.
Again I don't think this is standardized anywhere, but it feels very common and conventional.

Resources