I've been trying to validate my XHTML pages using the W3 (http://validator.w3.org)
Because I'm using phpMyFAQ feeds output on my pages and using it for the whole FAQ section most of my URL look like this:
http://www.uvolunteer.org/faqs/index.ph ... artlang=en
this URL will fail XHTML validation cos there are unencoded ampersands in URLs. So ( cat=1&id ) should really be ( cat=1&id ) the entity for the ampersand for it to pass.
I think you can change this by setting your php arg_separator.output in php.ini to something like '&' or ';' so I've sort of answered my question. But that bring all sorts of other problems based on the type of hosting being used. So the real question is would it be possible to modify the URL so it would read something like:
http://www.uvolunteer.org/faqs/catergor ... hema_name/
with the title words seperated by underscores. I'm thinking this would be great for search engine optimisation and also very user friendly.
I've searched around and I'm now looking into the Apache Module 'ModRewrite' as a solution. Would it be possible to make this change to the phpMyFAQ script or is it something that the server should handle?
If anyone has had similar problems with this issue, I'd be greatfull if you would share your findings.
Cheers
Nat
XHTML Validation & phpMyFAQ
Moderator: Thorsten
Hi,
we already have support for mod_rewrite in phpMyFAQ. The support of the record title in the URL will be supported in 2.0 and is already implemented.
I thought we fixed all unencoded ampersands but I will take a look on that.
bye
Thorsten
we already have support for mod_rewrite in phpMyFAQ. The support of the record title in the URL will be supported in 2.0 and is already implemented.
I thought we fixed all unencoded ampersands but I will take a look on that.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Silly me!
I was searching the forum using the wrong keywords, xhml intead of mod_rewrite!!!!!!!!!!!!!!!!!!
Thanks that's sorted now.
Once modwrite is activated in the admin control panel and .htaccess, will it also affect the output of the rss feeds? If not then that's where the unencoded ampersand will probably be be hiding, if there are any
Or is it up to the rss pharser to take care of that?
Cheers
Nat
I was searching the forum using the wrong keywords, xhml intead of mod_rewrite!!!!!!!!!!!!!!!!!!
Thanks that's sorted now.
Once modwrite is activated in the admin control panel and .htaccess, will it also affect the output of the rss feeds? If not then that's where the unencoded ampersand will probably be be hiding, if there are any
Or is it up to the rss pharser to take care of that?
Cheers
Nat
Hi,
the RSS feeds currently do not use URLs with mod_rewrite but they will do in 2.0.
bye
Thorsten
the RSS feeds currently do not use URLs with mod_rewrite but they will do in 2.0.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: XHTML Validation & phpMyFAQ
Hi Nat,
Ciao,
Matteo
If you're still using this code for managing the RSS feeds, you could replace the line for evaluating $url just to read:natmanu wrote:Because I'm using phpMyFAQ feeds output on my pages and using it for the whole FAQ section most of my URL look like this:
http://www.uvolunteer.org/faqs/index.ph ... artlang=en
this URL will fail XHTML validation cos there are unencoded ampersands in URLs. So ( cat=1&id ) should really be ( cat=1&id ) the entity for the ampersand for it to pass.
I think you can change this by setting your php arg_separator.output in php.ini to something like '&' or ';' so I've sort of answered my question. But that bring all sorts of other problems based on the type of hosting being used.
Code: Select all
...
$url = str_replace("&", "&", $item['link']);
...
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Amazon.co.uk Wishlist
Hi Nat,
, unfortunately I'm feverish (38+) since sunday afternoon.
Cheers,
Matteo
Just a littlenatmanu wrote:Guess you are still enjoying your World Cup victory
Cheers,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Amazon.co.uk Wishlist