Hi David,
I´m having some problems with the url rewrite.
The first problem that I noticed was that after I activated url rewrite the images aren´t showing anymore.
The second problem is that when I click on a link that leads to for example /about/, all the links on that page gets changed to /about/newlink.php, when it should lead to /newpage.php.
The last but biggest problem is that the product links aren´t working at all. It leads to a 404 page.
The rewrite line in htaccess for products is:
RewriteRule ^product/(.*)/(.*).html$ products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
And for about.php it´s:
RewriteRule ^about/$ about.php
I´ve emailed you my website address so you can take a look at it.
Regards,
Daniel.
Yep that did the trick David!
Awesome support as always, thank you! :)
Regards,
Daniel.
Hi Daniel,
A few inter-linked things going on here.
Firstly, in your footer (or wherever you have coded the links that appear at the bottom of every page), when you are using rewrite you must make sure that these links are fully qualified - in other words they being with "/", so instead of
<a href='contact.php'>
you would need<a href='/contact.php'>
Otherwise, the browser will request the link from the current directory - which in the case of your /about/ page is "about".Exactly the same issue with images, if the URL of the images doesn't begin with "/", it will be looked for in the current directory - so any page other than the home will not show images correctly.
Finally - the RewriteRule /product/ doesn't appear to be the one from the distribution - if you change it to:
RewriteRule ^product/(.*).html$ products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
...it should then work fine!
Cheers,
David.