![]() |
|
mod_rewrite - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: mod_rewrite (/thread-9463.html) Pages:
1
2
|
mod_rewrite - easynow - 2012-01-09 Hi. This is a great system you have provided. Thanks! I have a problem getting mod_rewrite to work: I have made sure that my .htaccess points to the zenphoto root, and my server support people tell me mod_rewrite is definitely enabled.. I also noticed I happen to have a .htaccess in both the web root on my server space and the root of zenphoto itself.. Is this right? I have exhausted the forum to try and find an answer for my specific problem, but no luck! thanks for any help at all! ` htaccess file version 1.2.8.0;When Zenphoto requires changes to the rewrite rules:First make a copy of this file as 'oldhtaccess' in the zp-core folder so setup can test for unmodified filesUpdate the above and the define in setup.phpRewriteEngine On RewriteBase /zenphoto RewriteRule ^admin/?$ zp-core/admin.php [R,L] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteRule index.php$ index.php [L,QSA] Rewrite rule addition for searchRewriteRule ^page/search/fields([0-9]+)/(.)/([0-9]+)/?$ index.php?p=search&searchfields=$1&words=$2&page=$3 [L,QSA] Rewrite additions for zenpage
RewriteRule ^pages/(.)/?$ index.php?p=pages&title=$1 [L,QSA] RewriteRule ^(.)/image/(thumb|[0-9]{1,4})/([^/\]+)$ zp-core/i.php?a=$1&i=$3&s=$2 [L,QSA] Catch-all - everything else gets handled in PHP for compatibility.RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA] ` mod_rewrite - Laurent - 2012-01-09 Hi, Maybe is the solution. Laurent mod_rewrite - easynow - 2012-01-09 now i get:
mod_rewrite - easynow - 2012-01-10 hmmm mod_rewrite - sbillard - 2012-01-10 Quote:I also noticed I happen to have a .htaccess in both the web root on my server space and the root of zenphoto itself.. Is this right? mod_rewrite - easynow - 2012-01-10 Ok! I shall delete the other one, thanks! Also, i noted on a recent update, in the setup process, zenphoto confirmed various things about mod_rewrite on my server to be a.ok? mod_rewrite - easynow - 2012-01-10 same issue mod_rewrite - sbillard - 2012-01-11 Do you get the 404 error when saving the mod_rewrite option? Of on a different page? In addition, what version of Zenphoto are you running? From the .htaccess file you listed it is an old one that should have been updated to prevent the recent security breach. Note also that the security breach did cause problems with redirections. Have you "cleansed" your site? mod_rewrite - easynow - 2012-01-11 Well, I was on 1.2.8 at the beginning of the week, and have been trying to go through each subsequent update one by one, but my server has a habit of cutting me off halfway through uploads, which has put me off upgrading unless absolutely necessary for a little while.. I'm on 1.3 now. I get a 404 when saving the option. When i return to the relevant page afterwards the box is still unchecked.. mod_rewrite - sbillard - 2012-01-11 You should be able to go directly to 1.4.1.6 [or better still, 1.4. RC3] straight from there. The admin pages are not using mod_rewrite, so that is not the issue then. Maybe a file permissions issue, but that seems unlikely since you can visit the page before the save. What is showing in the browser's address bar when you get the 404 error? mod_rewrite - easynow - 2012-01-11 Ok, well when my host gets back to me on the upload errors i will upgrade. Thank you for the advice! The URL i get is: mod_rewrite - easynow - 2012-01-11 oh and i have done no 'cleansing'..? mod_rewrite - sbillard - 2012-01-11 If your site was hit by the hack, one of the things it did was spray .htaccess files all about. So one of those might be still around. The link you show is pretty straight forward. So long as the admin-options.php script is present there should be no 404 errors. And we know it is present since you can try to save the option. This all leads me to suspect contaminated files in your installation. You should remove all the files from your site and replace them with known good backups or with the new install files. That is the "cleansing" I mentioned. mod_rewrite - easynow - 2012-01-11 ah... ok i shall! thanks! mod_rewrite - adijoy - 2012-01-11 same issue , too! mod_rewrite - easynow - 2012-01-11 Ok, this is a bit of a nightmare! I have DELETED my entire zenphoto folder, after backing up my albums, some custom template_functions and my theme files. I have DELETED my mySQL database and made a new one. So now I am going to try and start where i left off. I just performed a clean install of 1.2.8 [4881] since it was the last version that worked with my current theme. I intend to upgrade, but one stage at a time so i can iron out theme bugs as I go. I have uploaded one album for testing purposes, and i've noticed that mod_rewrite is working!? Well, it is at least trying to access http://domain.co.uk/myalbum/ from the gallery index, but then is reaching a 404. I tried to turn off mod_rewrite in the admin, but when i click save on that tab, even after changing nothing, i get: ` An appropriate representation of the requested resource /zp-core/admin-options.php could not be found on this server. Thanks for any help, I need it! mod_rewrite - acrylian - 2012-01-11 IF modrewrite is enabled on the admin options you also need a valid .htaccess file. Zenphoto 1.2.8 is quite old so you probably have to create it yourself using the template file within /zp-core. (I don't remember) On current releases the setup script will warn about a missing one and offer to create it. mod_rewrite - easynow - 2012-01-11 yeah it has! here is what it looks like right now: htaccess file version 1.2.8.0;When Zenphoto requires changes to the rewrite rules:First make a copy of this file as 'oldhtaccess' in the zp-core folder so setup can test for unmodified filesUpdate the above and the define in setup.phpRewriteEngine On RewriteBase /zenphoto RewriteRule ^admin/?$ zp-core/admin.php [R,L] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteRule index.php$ index.php [L,QSA] Rewrite rule addition for searchRewriteRule ^page/search/fields([0-9]+)/(.)/([0-9]+)/?$ index.php?p=search&searchfields=$1&words=$2&page=$3 [L,QSA] Rewrite additions for zenpage
RewriteRule ^pages/(.)/?$ index.php?p=pages&title=$1 [L,QSA] RewriteRule ^(.)/image/(thumb|[0-9]{1,4})/([^/\]+)$ zp-core/i.php?a=$1&i=$3&s=$2 [L,QSA] Catch-all - everything else gets handled in PHP for compatibility.RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA] ` zp-core/admin-options.php?action=saveoptions and returning: ` An appropriate representation of the requested resource /zp-core/admin-options.php could not be found on this server. mod_rewrite - easynow - 2012-01-11 Ok, an update: I have noted that when I load zenpage via my root domain: maindomain.com/zenphoto The mod_rewrite works and I get no 404s, however i still can't use the control panel general options tab to turn it off, i get a 'not acceptable' error. My zenphoto folder is in the web root of my site, and I have a secondary domain pointed to it: 2nddomain.com = maindomain.com/zenphoto im so confused and i just want the site live again, mod_rewrite or not. mod_rewrite - acrylian - 2012-01-11 You can disable modrewrite on the options, then the htaccess file is simply ignored. But if you use modrewrite you have to decide what domain you wish to use. The htaccess file can have only one rewrite base. (/ or /zenphoto in your examples). If you use both you need to setup redirection rules to make one domain the main one. Recommended for SEO anyway. |