J!Extensions Store™
Forum
Welcome, Guest
Please Login to access forum.
Re:How do I deal with rewrites for sitemap. (1 viewing) 
Go to bottom
TOPIC: Re:How do I deal with rewrites for sitemap.
#6650
Geoff Houghton
Fresh Boarder
Posts: 2
User Offline
How do I deal with rewrites for sitemap. Karma: 0  
I am trying to "crawl" data in my database for my website for the sitemap. The JSitemap component allows for building a sitemap from a database. My database is in the same instance as my Joomla install. In my case, I want to have "pretty" urls for my users. So instead of having something like http://www.mysite.com/site/pages/mypage.php?id=123&st=NY&title=MyPageTitle, I use a rewrite to transform the url to: http://www.mysite.com/page/123/NY/MyPageTitle

My question is there a way to maintain my database queries to the 2nd url as in this example? It looks like I could use your product if I were to switch to the first url in this example, but I really need the cleaner looking url. Is there away to achieve this so the urls in the sitemap displays the second url?

Let me know if I can clarify anything.

Regards,

Geoff
 
Logged Logged  
  The administrator has disabled public write access.
#6651
Geoff Houghton
Fresh Boarder
Posts: 2
User Offline
Re:How do I deal with rewrites for sitemap. Karma: 0  
In my database, I store the actual url for the individual sitemap entry that I would like to see in the sitemap. So if there is a way to grab that sitemap url with your product, I would be fine with using that as an alternate solution.

Thanks,

Geoff
 
Logged Logged  
  The administrator has disabled public write access.
#6652
John Dagelmore
Admin
Posts: 3716
User Online Now
Re:How do I deal with rewrites for sitemap. Karma: 79  
Hi Geoff,

i'm not sure to understand what you mean and what you are trying to accomplish.
JSitemap has a system to fetch data from a database and generate URLs, but the way that URLs are generated is completely outside JSitemap and it's the same that Joomla uses.
Reference: https://storejextensions.org/faq/does-jsitemap-generate-urls-or-is-responsible-for-that.html

There are plenty of available and ready data sources for components out there. If you are trying to develop your custom data source for a specific component, my advice is to read the PDF docs at the paragraph 'SQL Query Compiler' where you find a step by step example to understand a bit better how the SQL based data source works.
Also the way that queries are set is not always directly related to the format of 'pretty' URLs generate by various routers.

If you have instead a very specific system that i ignore and that holds certain URLs in the database already formatted and if you want to pull them in the sitemap, probably the only way to do this is to develop a plugin data source using the JSitemap API. You can request the API SDK in such case, contact me at This e-mail address is being protected from spam bots, you need JavaScript enabled to view it

The final alternative would be using the 'Links' type data source, but in this case you should specify links for the sitemap one by one manually.

Best regards,

John
 
Logged Logged  
  The administrator has disabled public write access.
Go to top