Forum Moderators: phranque
I'm quite noob using rewrite and i have a problematic rule right now.
This is the structure of the site i'm working on:
So for instance, assuming the site is called site.com (quite original isn't?) and the active language is en
a link in the main page pointing to items/item1, will be presented by the /index.php with the content of /languages/en/items/item1.
So the real structure is inside the languages.
The rewrite rule i'm using is:
RewriteRule!\.(gif¦jpg¦png¦css¦)$ index.php
So far, everything is working properly, but now imagine this situation:
you are in: site.com/items/item1, and in that page, you have a list of all the items, then you click on item2, the new URL becomes site.com/items/items/item2 and so on if you keep clicking items of the list.
The site still works properly, all the links point to the right places, all the images are present, etc, but the URL is obviously wrong.
I have been trying different rules, but i can not make it work, can any one help me here, or point me in the right direction.
Thank you for your time and excuse me for the long explanation.
:)
Bye
<a href="/items/item1">Item 1</a>
<a href="/items/item2">Item 2</a>
<a href="/items/item3">Item 3</a>
Jim