1

I can't figure out why this is happening. I think it's related to SEF URLs, but I'm hoping someone else can explain this to me.

So, I have a URL that looks like it should:

http://www.domain.com/pagename

When I go to this page, it is styled using the correct template and has all the modules that it should and it looks great.

The problem I just found is that I every article on my site can be linked like so:

http://www.domain.com/write-anything-here/article-number

When I go to a URL like this, it uses the same module and theme as my main default page, except with whatever article number is in the URL. It looks awful because the content doesn't match the layout and shouldn't be there.

Edit: I've done more investigating and I reduced it down to the IIS rewrite rule:

/component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$

Does anyone know how I can fix this so that I can still use SEF URLs but not expose every article of the site?

I think the real issue is that even with URL Rewrite off I can still go to every article by it's article number. http://www.website.com/index.php/187 takes me to article 187 and it shouldn't. Do I have something in Joomla configured incorrectly?

MathewPDX
  • 11
  • 3

2 Answers2

0

You get a first url (http://www.domain.com/pagename) when you're linking to an article as a menu item, where 'pagename' is your menu item alias.

The second link is when you access article via category, and no menu item is assignem (probably). The easiest solution for this would be to create a hidden menu, and in that menu item create a menu item, linking to that category and assign all styling for that menu item. In that case you article should be displayed fine.

di3sel
  • 2,002
  • 15
  • 24
  • But the middle part isn't part of a category. I could type anything into the middle part and as long as I tack on /123 or whatever article number it spit out the article. – MathewPDX Oct 16 '13 at 19:02
0

There is an ongoing discussion on the Google Group about the Joomla routing. Hannes proposed some changes which especially also address your issue as far as I understood it. See https://groups.google.com/forum/#!topic/joomla-dev-cms/Lnyo5JLtwlU

Bakual
  • 2,731
  • 1
  • 13
  • 16
  • I _think_ this is the same thing causing the problem, but it's beyond my level of understanding to fix it at the moment. This is frustrating because Google is finding URLs on my site that shouldn't even exist. – MathewPDX Oct 16 '13 at 19:07