URL Rewrite problems - gallery works fine but wordpress pages don't
ChrisJP
Joined: 2008-07-06
Posts: 8 |
Posted: Sun, 2008-07-06 18:01 |
So I've checked out every rewrite topic on the first few pages and no one has the same problem as me. Basically I want rewritten URL's for both my actual blog and the gallery, so both are on. The gallery is working perfectly fine, but blog posts and pages in wordpress aren't. They just show a gallery page with a 404 error inside it. Example of my gallery working fine: http://www.laurarobsonfans.co.uk/imagegallery (don't worry, there aren't any images uploaded yet, just deleted them after verifying it works) I'm guessing it's just a problem with the .htaccess file, which I've pasted below. And yes I tried moving the Wordpress rule to the top but it made no difference, and actually made only the main gallery page show, making the situation worse. # BEGIN Url Rewrite section # (Automatically generated. Do not edit this section) <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . - [L] RewriteCond %{HTTP:Authorization} (.+) RewriteCond %{QUERY_STRING} !g2_authorization= RewriteRule . %{REQUEST_URI}?g2_authorization=%1 [QSA] RewriteCond %{QUERY_STRING} view=core.DownloadItem RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://www.laurarobsonfans.co.uk/ [NC] RewriteCond %{HTTP:Referer} !^$ RewriteRule . /imagegallery [F,L] RewriteCond %{QUERY_STRING} g2_view=core.DownloadItem RewriteCond %{QUERY_STRING} g2_itemId=([0-9]+) RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://www.laurarobsonfans.co.uk/ [NC] RewriteCond %{HTTP:Referer} !^$ RewriteRule . /gallery/main.php?g2_view=rewrite.DownloadItem&g2_itemId=%1 [L] RewriteCond %{QUERY_STRING} g2_view=core.DownloadItem RewriteCond %{QUERY_STRING} g2_itemId=([0-9]+) RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://www.laurarobsonfans.co.uk/ [NC] RewriteCond %{HTTP:Referer} !^$ RewriteRule . /gallery/main.php?g2_view=watermark.DownloadItem&g2_itemId=%1 [L] RewriteCond %{THE_REQUEST} /sitemap(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=sitemap.Sitemap [QSA,L] RewriteCond %{THE_REQUEST} /popular(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=dynamicalbum.PopularAlbum [QSA,L] RewriteCond %{THE_REQUEST} /updates(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=dynamicalbum.UpdatesAlbum [QSA,L] RewriteCond %{THE_REQUEST} /random(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=dynamicalbum.RandomAlbum [QSA,L] RewriteCond %{THE_REQUEST} /v/([^?]+)/slideshowapplet\.html(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=slideshowapplet.SlideshowApplet&g2_path=%1 [QSA,L] RewriteCond %{THE_REQUEST} /d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /gallery/main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3 [QSA,L] RewriteCond %{THE_REQUEST} /v/([^?]+)/slideshow\.html(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=slideshow.Slideshow&g2_path=%1 [QSA,L] RewriteCond %{THE_REQUEST} /c/view/([0-9]+)\.html(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=comment.ShowAllComments&g2_itemId=%1 [QSA,L] RewriteCond %{THE_REQUEST} /c/add/([0-9]+)\.html(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=comment.AddComment&g2_itemId=%1 [QSA,L] RewriteCond %{THE_REQUEST} /rating/([^?/]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=rating.RatingAlbum&g2_limit=%1 [QSA,L] RewriteCond %{THE_REQUEST} /rss/([^\/\?]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=rss.Render&g2_name=%1 [QSA,L] RewriteCond %{THE_REQUEST} /srss/([0-9]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=rss.SimpleRender&g2_itemId=%1 [QSA,L] RewriteCond %{THE_REQUEST} /key/([^?/]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=keyalbum.KeywordAlbum&g2_keyword=%1 [QSA,L] RewriteCond %{THE_REQUEST} /v/([^?]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_path=%1 [QSA,L] RewriteCond %{THE_REQUEST} /([^?]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/imagegallery$ RewriteRule . /imagegallery?g2_view=rewrite.FileNotFound [QSA,L] </IfModule> # END Url Rewrite section # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Thanks for any help. If it makes any difference, I'm on WP 2.5.1 and Gallery 2.2.4. P.S. sorry if this is posted multiple times but your forum keeps timing out and showing blank pages... |
|