looking at the database, in the options table, there is an option for “page” and an option for “baseurl”…these specifically relate to fGallery…would one of those have affected it? i assumed since i can’t get to the site at all, that it wouldn’t have to do with the options of fGallery, but wordpress…
ok, here’s what i’ve found in the code for the gallery….hopefully someone can help figure out what i need to do:
function fim_rewrite_rule()
{
// Complete url
$url = get_bloginfo('wpurl');
$urlparts = parse_url($url);
$base = get_option('fim_baseurl');
$rewrite = "# BEGIN FGALLERY\n<IfModule mod_rewrite.c>\nRewriteEngine On\nRewriteRule ^$base/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?$ $urlparts[path]/wp-content/plugins/fgallery/fim_photos.php?$1=$2&$3=$4 [QSA,L]\n</IfModule>\n# END FGALLERY\n";
return $rewrite;
}
if(isset($_POST['rewrite']))
{
$url = $_POST['baseurl'];
$url = strtolower($url);
$url = str_replace(" ", "_", $url);
update_option('fim_baseurl', $url);
$file = "../.htaccess";
if(is_writable($file))
{
$content = file_get_contents ($file);
$content = preg_replace("/(# BEGIN FGALLERY)(\n+.*)*(# END FGALLERY)\n/", "", $content);
$content = fim_rewrite_rule().$content;
$f = fopen("../.htaccess", "w");
fwrite($f, $content);
fclose($f);
//echo "<pre>$content</pre>";
echo "<div class='updated fade' id='message'><p>".__('Mod ReWrite rules successfully updated', 'fgallery').".</p></div>";
}
else
{
?><div class="wrap">
<h2><?php _e("Add ReWrite rules", 'fgallery');?></h2>
<?php _e(".htaccess is not writable so you have to add add the following manually", 'fgallery');
echo "<p>".__('This should be at the TOP of your .htacces file before the WordPress rules', 'fgallery').".</p>";?>
<textarea cols="100" rows="5" wrap="off"><?php echo fim_rewrite_rule(); ?></textarea></div><?php
}
}
do i need to look at my htaccess file and correct something there?
here’s my htaccess file:
# BEGIN FGALLERY
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?$ /wp-content/plugins/fgallery/fim_photos.php?$1=$2&$3=$4 [QSA,L]
</IfModule>
# END FGALLERY
# BEGIN FGALLERY
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^photos/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?$ /wp-content/plugins/fgallery/fim_photos.php?$1=$2&$3=$4 [QSA,L]
</IfModule>
# END FGALLERY
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
no one knows anything about mod-rewrites?