I have this html:
<ul>
<li><a href="index.php/Page1">Page 01</a></
<li><a href="index.php/Page2">Page 02</a></li>
<li><a href="index.php/Page3">Page 03</a></li>
</ul>
As you can see, I need to use the index.php/prefix in all links due to the server of my university
(I can't change it). The way is done above, it works fine to go straightfoward from home to any page, but if I try to access a page from another page, I get a wrong URL and Can't access the page:
Examples:
Home
http://localhost/php-project/public/
Page1 (From home)
FROM: http://localhost/php-project/public/
TO: http://localhost/php-project/public/index.php/Page1
Page2 (From home)
FROM: http://localhost/php-project/public/
TO: http://localhost/php-project/public/index.php/Page2
Page1 (From Page2)
FROM: http://localhost/php-project/public/index.php/Page2
TO: http://localhost/php-project/public/index.php/index.php/Page1
as you can see, the prefix repeats itself. I have no idea how to do it to work right.
Any ideas?
<a href="/index.php/Page1", Note the / before index.phphttp://localhost/index.php/importand cant access the page, missing the ´public/`.