![]() |
|
Mod_Rewrite problem - 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 problem (/thread-3349.html) |
Mod_Rewrite problem - farhan - 2008-10-06 I have a stat script installed at /stat and zenphotos is installed at root. couple of days ago i could access the stat directory fine but i recently updated apache (2.2) and php (5.2.6) and now i can't seem to access the stat directory unless i disable mod_rewrite. The zenphoto is installed in root that is at http://domain.com and the stat is installed at http://domain.com/stat I get the 404 page if i open the stat page when mod_rewrite is on. My .htaccess file is [cpde] htaccess file version 1.1.6.0Update the above and the define in setup.php when you make changes to the rewrite rules!NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory. (Or let setup.php do it for you!)RewriteEngine On !!! Change this to the web path (eg: http://www.yourwebsite.com/photos --> /photos) !!!RewriteBase / 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 addtion for searchRewriteRule ^page/([A-Za-z0-9-]+)/fields([0-9]+)/(.*)/([0-9]+)/?$ index.php?p=$1&searchfields=$2&words=$3&page=$4 [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] [/code] Mod_Rewrite problem - acrylian - 2008-10-06 If you run Zenphoto 1.2.1 that is not the correct .htaccess file which should read version 1.2.1.3. Anyway the fix is most likely to change Mod_Rewrite problem - farhan - 2008-10-06 I am running zenphoto 1.2 not 1.2.1 I changed what you told, still same problem. Mod_Rewrite problem - sbillard - 2008-10-06 The rewrite rule acrylian mentions is the one that should be letting you access your /stat folder. However, the rule basically says "if a file or folder by the name of the request exists, just use the request". So, maybe there is a problem with the case of the request or maybe the exact file does not exist. |