old pivot URL to new pivotx URL and mod_rewrite

This is the place to discuss bugs that have been found in the most recent version of PivotX. Posting bugs will ensure that the Development Team is aware of them and that they will be addressed when resources are available.

old pivot URL to new pivotx URL and mod_rewrite

Postby jult » Sun Jun 05, 2011 9:55 pm

OK, so I'm not using htaccess, I usually do my config directly in websever-config files. Seems pivot still can't handle that.
Can someone here tell me how to get pivotx to use the pretty URLs instead of the ?a=2011-m06#e865 stuff ? Obviously, just putting the example.htaccess entries directly in the website's config-file under the sites-available of apache2 does not work. I'm running a Debian x64 with the latest stable PHP5 and apache2.
Last edited by jult on Tue Jun 07, 2011 12:04 am, edited 1 time in total.
jult
 
Posts: 29
Joined: Sun Jun 05, 2011 9:43 pm

Re: old pivot URL to new pivotx URL and mod_rewrite

Postby hansfn » Mon Jun 06, 2011 7:03 am

So, you have enabled Mod_rewrite in the configuration? You need to do that first. The rules in example.htaccess should be usable directly in a vhost - I do that on my server. If it doesn't work for you, you could try to add a slash in front of the rewritten URL - like

Code: Select all
RewriteRule ^page/(.*)$ /index.php?uri=$1&rewrite=page [L,QSA]

but that shouldn't be necessary.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: old pivot URL to new pivotx URL and mod_rewrite

Postby jult » Mon Jun 06, 2011 3:59 pm

Of course I enabled mod-rewite in the settings..

Also, I noticed my folder /archives still has all the old pivot's archives in them; http://jult.net/archives/2006-m07 while they are being linked to from pivotX (!?). This seems a bit sloppy. Is there a place where I can recreate them for pivotx? Could not find it in the admin screens..

apache2's logs and headers don't tell me anything about the cause of pivotx rewrites not working.
My server is nothing out of the ordinary, a standard debian lenny, with standard php5 and apache2, and I followed installation (and conversion from pivot) to the dot. Which also did not tell me to delete the /archives files, nor did it say what to do with the (content of) folders /extensions and /images..
Last edited by jult on Tue Jun 07, 2011 12:06 am, edited 1 time in total.
jult
 
Posts: 29
Joined: Sun Jun 05, 2011 9:43 pm

Re: old pivot URL to new pivotx URL and mod_rewrite

Postby hansfn » Mon Jun 06, 2011 4:25 pm

Hm, I really get the expression you want to switch blogging software. If so, tell me so I don't waste my time helping you ;-)

From the RewriteRule docs:
What is matched?

In VirtualHost context, The Pattern will initially be matched against the part of the URL after the hostname and port, and before the query string (e.g. "/app1/index.html").

In Directory and htaccess context, the Pattern will initially be matched against the filesystem path, after removing the prefix that lead the server to the current RewriteRule (e.g. "app1/index.html" or "index.html" depending on where the directives are defined).

Since the rules are written for .htaccess, you should apply them inside a Directory directive inside the virtual host or add a slash to the beginning of all the patterns (found in example.htaccess). I used a Directory directive on my server so I didn't have to alter the rules.

The old Pivot files in the archives should be deleted. It's just the mod_rewrite/non-crufty archive URLs that happens to point to the same location. (Nothing sloppy here.) To be 110% clear: PivotX doesn't create any static files.

Yes, the upgrading instructions could be better, I guess. I'll add a note about removing the static archives files and the old extensions.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: old pivot URL to new pivotx URL and mod_rewrite

Postby jult » Mon Jun 06, 2011 4:44 pm

... :mrgreen:
Last edited by jult on Tue Jun 07, 2011 12:05 am, edited 1 time in total.
jult
 
Posts: 29
Joined: Sun Jun 05, 2011 9:43 pm

Re: old pivot URL to new pivotx URL and mod_rewrite

Postby hansfn » Mon Jun 06, 2011 5:19 pm

I don't understand why you think upgrading to Pivot 1.40.8 or switching to PivotX, will fix your mod_rewrite problems. This is an Apache issue - not Pivot/PivotX.

To understand what is going on, just enable logging:

Code: Select all
RewriteLogLevel 3
RewriteLog "/var/log/apache2/rewrite.log"
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: old pivot URL to new pivotx URL and mod_rewrite

Postby hansfn » Tue Jun 07, 2011 7:39 am

I guess my reply (above) doesn't make much sense to other people reading this thread. The reason is that jult edited the posted I replied to.

@jult: Apparently you got it to work. Can you share the solution with the forum so other people can benefit from your struggles?
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway


Return to 2.x Bugs

Who is online

Users browsing this forum: No registered users and 5 guests

cron