Pretty URLS are breaking pagination on page_list block
Permalink
I just copied a site over from my local MAMP installation (where everything was running just fine) to new hosting at Network Solutions. As I was going through testing everything out, I ran into trouble getting the Pretty URLs working. After a bunch of searching on this site (and some trial and error) I finally got things working by adding the following line to the php.ini file in the root folder:
I thought all was well until I got to the page that has a page_list block with pagination at the bottom. Clicking the "Next" link or any of the numbered page links just reloads the same, first page (you can try it yourself here: http://tinyurl.com/76k5yet ).
Turning off Pretty URLs and the pagination works (after clearing server cache).
After some more searching in the forums, I found someone else who had said that they modified the Pretty URLs code in htaccess and modified this line:
so that it read like this, by adding the "QSA" into the brackets at the end.
Supposedly this has something to do with Query String Append. Nada. Didn't help.
Anyone else run into this and/or solve it? I sure could use some help!!!
Thanks,
- John
cgi.fix_pathinfo = 0
I thought all was well until I got to the page that has a page_list block with pagination at the bottom. Clicking the "Next" link or any of the numbered page links just reloads the same, first page (you can try it yourself here: http://tinyurl.com/76k5yet ).
Turning off Pretty URLs and the pagination works (after clearing server cache).
After some more searching in the forums, I found someone else who had said that they modified the Pretty URLs code in htaccess and modified this line:
RewriteRule ^.*$ index.php/$1 [L]
so that it read like this, by adding the "QSA" into the brackets at the end.
RewriteRule ^.*$ index.php/$1 [QSA,L]
Supposedly this has something to do with Query String Append. Nada. Didn't help.
Anyone else run into this and/or solve it? I sure could use some help!!!
Thanks,
- John
OK. This is strange... I got things working by following the instructions on this site:http://jeremeclaussen.com/blog/2010/3/30/concrete5-pretty-urls-and-...
Jeremy found a way by changing the HTACCESS Pretty URL code. In his example, he created a new file (pretty_url.php) that just includes the index.php file... and re-wrote the ReWrite rule to use the new file. But, more importantly (for me), he changed the syntax on the ReWrite rule. The original is this:
He changed his to use his pretty_url.php... but also changed the matching code from "^(.*)$" to "^.*$" like this:
So I tried it... and it worked.
But then I noticed the change in syntax and thought "Maybe THAT'S what's causing this to work!". Since I don't really like the idea of adding an extra file into the process (using the HTACCESS to call "pretty_url.php" that just requires "index.php"), I thought I try merging Jeremy's change with the original and came up with this:
The QSA came from another thread (and I don't think it's really doing anything here), but all appears to be working... so I'm not going to rock that boat!
Thanks for listening to me rant. Hopefully, this could help someone else who is trying to get their site working with Pretty URLs on Network Solutions!
- John
P.S... anyone have any thoughts on WHY this works? How come changing the ReWrite rule to "^.*$" from "^(*.)$" works on Network Solutions?!?!
Jeremy found a way by changing the HTACCESS Pretty URL code. In his example, he created a new file (pretty_url.php) that just includes the index.php file... and re-wrote the ReWrite rule to use the new file. But, more importantly (for me), he changed the syntax on the ReWrite rule. The original is this:
RewriteRule ^(.*)$ index.php/$1 [L]
He changed his to use his pretty_url.php... but also changed the matching code from "^(.*)$" to "^.*$" like this:
RewriteRule ^.*$ pretty_url.php/$1 [L]
So I tried it... and it worked.
But then I noticed the change in syntax and thought "Maybe THAT'S what's causing this to work!". Since I don't really like the idea of adding an extra file into the process (using the HTACCESS to call "pretty_url.php" that just requires "index.php"), I thought I try merging Jeremy's change with the original and came up with this:
RewriteRule ^.*$ index.php/$1 [L,QSA]
The QSA came from another thread (and I don't think it's really doing anything here), but all appears to be working... so I'm not going to rock that boat!
Thanks for listening to me rant. Hopefully, this could help someone else who is trying to get their site working with Pretty URLs on Network Solutions!
- John
P.S... anyone have any thoughts on WHY this works? How come changing the ReWrite rule to "^.*$" from "^(*.)$" works on Network Solutions?!?!
This is working for me:
RewriteRule ^(.*)$ index\.php?/$1 [QSA,L]
SHEESH! What gives with Network Solutions? I haven't had any of these problems when developing or testing sites on GoDaddy!!! (go figure!).
HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- John