g2b1 url rewrite setup.
redtea
Joined: 2005-02-07
Posts: 10 |
![]() |
my apache2 already LoadModule rewrite_module modules/mod_rewrite.so my website run on virtualhost mode.
|
|
redtea
Joined: 2005-02-07
Posts: 10 |
![]() |
up. |
|
pelle
![]()
Joined: 2004-12-10
Posts: 389 |
![]() |
I assume you have gallery installed in /gallery2 or /gallery (otherwise you wouldn't have gotten that error message) and depending on which one there's two ways you could test if mod_rewrite is loaded: /galler2: Dont do this localy, go to the URL so Apache processes the request. What do you see? If these tests pass Gallery should detect this, but since you got the error message I'm expecting you to see something else than 'PASS_REWRITE |
|
redtea
Joined: 2005-02-07
Posts: 10 |
![]() |
my gallery2 beta1 install at xxx.com/gallery2 . oh ,god, my rebuild apache 2.0.53, OK, I use ./apachectl -l display include mod_rewrite.c add "RewriteEngine On" into httpd.conf restart apache test again,still fail. |
|
pelle
![]()
Joined: 2004-12-10
Posts: 389 |
![]() |
Go to /gallery2/lib/tools/phpinfo.php and in the section apache2handler you should see mod_rewrite in the list of 'Loaded Modules'. I recon you wont, in which case I suggest you read the Apache docs. |
|
redtea
Joined: 2005-02-07
Posts: 10 |
![]() |
run phpinfo.php in the section apache2handler, core mod_access mod_auth mod_include mod_log_config mod_env mod_setenvif prefork http_core mod_mime mod_status mod_autoindex mod_asis mod_cgi mod_negotiation mod_dir mod_imap mod_actions mod_userdir mod_alias mod_rewrite mod_so sapi_apache2 why url rewrite pluging tell me "Apache mod_rewrite is not installed or not enabled." ??? very unusual.. |
|
pelle
![]()
Joined: 2004-12-10
Posts: 389 |
![]() |
Do you have 'AllowOverride Options' for your Gallery directory? Apache mod_rewrite needs 'Options FollowSymlinks'. You could verify by creating a symlink to an existing file and try to access it. |
|
redtea
Joined: 2005-02-07
Posts: 10 |
![]() |
I don't know. can you give me a sample? thanks. |
|
pelle
![]()
Joined: 2004-12-10
Posts: 389 |
![]() |
cd .../gallery2/ ln -s modules/rewrite/test/mod_rewrite/gallery2/Works.txt Works.txt Go to http://.../gallery2/Works.txt |
|
phinex
Joined: 2004-02-26
Posts: 3 |
![]() |
pelle wrote:
cd .../gallery2/ ln -s modules/rewrite/test/mod_rewrite/gallery2/Works.txt Works.txt I ecounter the same problem with redtea, but I can successfully done this. Anything can be further checked ? |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Pelle is out of town for a week, but when he gets back he's got a newer version of the module that will hopefully do a better job of detection. He'll get back to you when he can. |
|
phinex
Joined: 2004-02-26
Posts: 3 |
![]() |
I have solved this problem by doing the following two things, and rewrite works. By commentting the "Options +FollowSymlinks" in both /gallery2/.htaccess and /gallery2/modules/rewrite/test/mod_rewrite/gallery2/.htaccess, gallery module can detect my mod_rewite and I can use rewrite to view the album. BTW, the view of rewrite and the original view are not the same. How could this happen ? I mean the /gallery2/v/user is not the same with /gallery2/main.php?g2_view=core:ShowItem&g2_itemId=1144. How could I solve this ? |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Hard to say .. can you give us the actual urls so that we can see for ourselves? |
|
phinex
Joined: 2004-02-26
Posts: 3 |
![]() |
bharat wrote:
Hard to say .. can you give us the actual urls so that we can see for ourselves? It is my own problem, and now has been solved. But, another thing is the current-release(03-14) can work, but when I use cvs to update from beta1. The rewrite url module seems to fail. I want to ask that whether current.gallery2.tar.gz is newer than that of cvs updated. Thank you very much. |
|
pelle
![]()
Joined: 2004-12-10
Posts: 389 |
![]() |
phinex wrote:
By commentting the "Options +FollowSymlinks" in both /gallery2/.htaccess and /gallery2/modules/rewrite/test/mod_rewrite/gallery2/.htaccess, gallery module can detect my mod_rewite and I can use rewrite to view the album. Souns like we should make a second test, testing mod_rewrite withouth the Options line and determine if it's nessisary. I belive this was (is?) an issue wtih G1 too. I'm on it right away. phinex wrote:
I want to ask that whether current.gallery2.tar.gz is newer than that of cvs updated. CVS is the most current, current.gallery2.tar.gz is created once every night, its a snapshot of what the CVS looked like at that perticular moment. phinex wrote:
The rewrite url module seems to fail. Well, it'd be great if you explain what's wrong with it. |
|
ziddey
Joined: 2004-11-01
Posts: 52 |
![]() |
is there a way to get the modrewrite to be able to take on a full hostname? that way, regardless of whether i goto ijib.com or www.ijib.com, itll 301 to www.ijib.com or something like that |
|
pelle
![]()
Joined: 2004-12-10
Posts: 389 |
![]() |
Didn't this work? |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
URL Rewrite has broke for me after upgrading from cvs - 04-18-2005. I know mod_rewrite is enabled because /gallery2/modules/rewrite/test/mod_rewrite/gallery2/Rewrite.txt displays 'PASS_REWRITE' and phpinfo says its loaded. I removed everything from the /gallery2/.htaccess file, restarted Apache, uninstalled the URL Rewrite module and cleared my mmcache. Tried commentting the "Options +FollowSymlinks" in both /gallery2/.htaccess and /gallery2/modules/rewrite/test/mod_rewrite/gallery2/.htaccess to no avail. |
|
pelle
![]()
Joined: 2004-12-10
Posts: 389 |
![]() |
swordfish wrote:
gallery2/modules/rewrite/test/mod_rewrite/gallery2/Rewrite.txt displays 'PASS_REWRITE' The configure page should say its OK if you get PASS_REWRITE. Check the apache access log; what HTTP header is sent? About the Options +FollowSymlinks hack, we try to detect this now so this is not needed anymore. |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
pelle wrote:
Below is contents of access log from install URL Rewrite to attempting to configure. 24.xx.xx.xx - admin [19/Apr/2005:20:02:15 -0700] "GET /gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=core:AdminModules&g2_navId=x7fc337d7 HTTP/1.1" 200 36054 24.xx.xx.xx - admin [19/Apr/2005:20:02:15 -0700] "GET /gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=core:AdminModules&g2_navId=x7fc337d7 HTTP/1.1" 200 36054 "http://24.xx.xx.xx/gallery2/main.php?g2_view=core:SiteAdmin&g2_return=http%3A%2F%2F24.xx.xx.xx%2Fgallery2%2Fmain.php&g2_returnName=album&g2_navId=" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" 24.xx.xx.xx - admin [19/Apr/2005:20:02:15 -0700] "GET /gallery2/modules/core/data/module-install.gif HTTP/1.1" 304 - 24.xx.xx.xx - admin [19/Apr/2005:20:02:15 -0700] "GET /gallery2/modules/core/data/module-install.gif HTTP/1.1" 304 - "http://24.xx.xx.xx/gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=core:AdminModules&g2_navId=x7fc337d7" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" 24.xx.xx.xx - admin [19/Apr/2005:20:02:15 -0700] "GET /gallery2/modules/core/data/module-inactive.gif HTTP/1.1" 304 - 24.xx.xx.xx - admin [19/Apr/2005:20:02:15 -0700] "GET /gallery2/modules/core/data/module-inactive.gif HTTP/1.1" 304 - "http://24.xx.xx.xx/gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=core:AdminModules&g2_navId=x7fc337d7" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" 24.xx.xx.xx - admin [19/Apr/2005:20:02:15 -0700] "GET /gallery2/modules/core/data/module-active.gif HTTP/1.1" 304 - 24.xx.xx.xx - admin [19/Apr/2005:20:02:15 -0700] "GET /gallery2/modules/core/data/module-active.gif HTTP/1.1" 304 - "http://24.xx.xx.xx/gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=core:AdminModules&g2_navId=x7fc337d7" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" 24.xx.xx.xx - admin [19/Apr/2005:20:02:15 -0700] "GET /gallery2/modules/core/data/module-upgrade.gif HTTP/1.1" 304 - 24.xx.xx.xx - admin [19/Apr/2005:20:02:15 -0700] "GET /gallery2/modules/core/data/module-upgrade.gif HTTP/1.1" 304 - "http://24.xx.xx.xx/gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=core:AdminModules&g2_navId=x7fc337d7" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" 24.xx.xx.xx - - [19/Apr/2005:20:03:10 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite_no_options/gallery2/Rewrite.txt?g2_navId=x7fc337d7 HTTP/1.0" 401 397 24.xx.xx.xx - - [19/Apr/2005:20:03:10 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite_no_options/gallery2/Rewrite.txt?g2_navId=x7fc337d7 HTTP/1.0" 401 397 "-" "-" 24.xx.xx.xx - - [19/Apr/2005:20:03:10 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite/gallery2/Rewrite.txt?g2_navId=x7fc337d7 HTTP/1.0" 401 397 24.xx.xx.xx - - [19/Apr/2005:20:03:10 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite/gallery2/Rewrite.txt?g2_navId=x7fc337d7 HTTP/1.0" 401 397 "-" "-" 24.xx.xx.xx - admin [19/Apr/2005:20:03:10 -0700] "GET /gallery2/main.php?g2_controller=core:AdminModules&g2_moduleId=rewrite&g2_action=install&g2_navId=x7fc337d7 HTTP/1.1" 302 5 24.xx.xx.xx - admin [19/Apr/2005:20:03:10 -0700] "GET /gallery2/main.php?g2_controller=core:AdminModules&g2_moduleId=rewrite&g2_action=install&g2_navId=x7fc337d7 HTTP/1.1" 302 5 "http://24.xx.xx.xx/gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=core:AdminModules&g2_navId=x7fc337d7" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" 24.xx.xx.xx - admin [19/Apr/2005:20:03:10 -0700] "GET /gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=core:AdminModules&g2_statusId=xd7b23b1f&g2_navId=x7fc337d7 HTTP/1.1" 200 36393 24.xx.xx.xx - admin [19/Apr/2005:20:03:10 -0700] "GET /gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=core:AdminModules&g2_statusId=xd7b23b1f&g2_navId=x7fc337d7 HTTP/1.1" 200 36393 "http://24.xx.xx.xx/gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=core:AdminModules&g2_navId=x7fc337d7" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" 24.xx.xx.xx - - [19/Apr/2005:20:03:13 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite_no_options/gallery2/Rewrite.txt HTTP/1.0" 401 397 24.xx.xx.xx - - [19/Apr/2005:20:03:13 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite_no_options/gallery2/Rewrite.txt HTTP/1.0" 401 397 "-" "-" 24.xx.xx.xx - - [19/Apr/2005:20:03:13 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite/gallery2/Rewrite.txt HTTP/1.0" 401 397 24.xx.xx.xx - - [19/Apr/2005:20:03:13 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite/gallery2/Rewrite.txt HTTP/1.0" 401 397 "-" "-" 24.xx.xx.xx - admin [19/Apr/2005:20:03:13 -0700] "GET /gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=rewrite:SetupRewrite&g2_navId=x7fc337d7 HTTP/1.1" 200 11713 24.xx.xx.xx - admin [19/Apr/2005:20:03:13 -0700] "GET /gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=rewrite:SetupRewrite&g2_navId=x7fc337d7 HTTP/1.1" 200 11713 "http://24.xx.xx.xx/gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=core:AdminModules&g2_statusId=xd7b23b1f&g2_navId=x7fc337d7" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" 24.xx.xx.xx - admin [19/Apr/2005:20:06:20 -0700] "POST /gallery2/main.php HTTP/1.1" 302 5 24.xx.xx.xx - admin [19/Apr/2005:20:06:20 -0700] "POST /gallery2/main.php HTTP/1.1" 302 5 "http://24.xx.xx.xx/gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=rewrite:SetupRewrite&g2_navId=x7fc337d7" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" 24.xx.xx.xx - - [19/Apr/2005:20:06:20 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite_no_options/gallery2/Rewrite.txt HTTP/1.0" 401 397 24.xx.xx.xx - - [19/Apr/2005:20:06:20 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite_no_options/gallery2/Rewrite.txt HTTP/1.0" 401 397 "-" "-" 24.xx.xx.xx - - [19/Apr/2005:20:06:20 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite/gallery2/Rewrite.txt HTTP/1.0" 401 397 24.xx.xx.xx - - [19/Apr/2005:20:06:20 -0700] "GET /gallery2/modules/rewrite/test/mod_rewrite/gallery2/Rewrite.txt HTTP/1.0" 401 397 "-" "-" 24.xx.xx.xx - admin [19/Apr/2005:20:06:21 -0700] "GET /gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=rewrite:SetupRewrite&g2_navId=x7fc337d7 HTTP/1.1" 200 11713 24.xx.xx.xx - admin [19/Apr/2005:20:06:21 -0700] "GET /gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=rewrite:SetupRewrite&g2_navId=x7fc337d7 HTTP/1.1" 200 11713 "http://24.xx.xx.xx/gallery2/main.php?g2_view=core:SiteAdmin&g2_subView=rewrite:SetupRewrite&g2_navId=x7fc337d7" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" |
|
tomcat76
![]()
Joined: 2003-04-22
Posts: 133 |
![]() |
Hi All... I've had a problem with this mod rewrite and when I try to config it it says its not working, if I upload the .htaccess file the next page I get is totally blank, but using phinex's solution above it now says " Apache mod_rewrite is working properly." then goes onto say " Your .htaccess file is ready to be updated." but if I update it I'm back to square one as it uploads the new file, so cannot still configure it. Now I'm sure this used to work ok on a previous version of g2 as I was surprised I could now have short urls displayed, but now with holy hand grenade it no longer does. My site is hosted here in the uk.... |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
URL Rewrite worked for me using G2 Beta 2 and a few cvs updates afterward. Then it was updated from 0.9.1 or 0.9.2 to 0.9.3. After updating to 0.9.3 it has not worked since. I been all over these forums and tried everything to no avail. |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
SOLVED!!! Once again I was bitten by Apache. My Gallery site is not public as I use Mod_Auth. I temporarily disabled mod_auth and was able to successfully configure G2 Url Rewrite and activate. So, why does G2 URL Rewrite fail to configure when the site is password protected with mod_auth???? |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
That's odd. Can you file a bug against this? I'll assign it to pelle |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
I believe there is two separate issues wrt URL Rewrite and mod_auth.? |
|
pelle
![]()
Joined: 2004-12-10
Posts: 389 |
![]() |
tomcat76, get the latest nigthly snapshot. The Options +FollowSymLinks thing has been fixed in rewrite 0.9.3 |
|
StanVanDam
Joined: 2003-07-19
Posts: 19 |
![]() |
If you still have problems, refer to http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=151037#151037 |
|
stephenju
![]()
Joined: 2005-07-05
Posts: 172 |
![]() |
I too can't get URL Rewrite to work. It complains about " Apache mod_rewrite is not installed or not enabled." But the test to /modules/rewrite/test/mode_rewrite/gallery2/Rewrote.txt shows "PASS_REWRITE". I am running Gallery2 Beta 3. |
|
pelle
![]()
Joined: 2004-12-10
Posts: 389 |
![]() |
Upgrade, upgrade people stephenju, get tonights snapshot or update cvs |
|
stephenju
![]()
Joined: 2005-07-05
Posts: 172 |
![]() |
OK. OK. Now is there any note or warning that I can read for the upgrade to the nightly? I am also working on Traditional Chinese translation and don't want my work lost to the upgrade. |
|
pelle
![]()
Joined: 2004-12-10
Posts: 389 |
![]() |
stephenju, if you're doing translations I sugest you use cvs. Also, there's been a major themes refactor so your translation might be outdated. |
|
stephenju
![]()
Joined: 2005-07-05
Posts: 172 |
![]() |
pelle, does using CVS leave the files I changed in translation when updating? Forgive the ignorance for I've never used CVS. Also, I have to do the localization on my local PC/Mac for my hosting doesn't have shell access. This makes constantly updating my installation a bit hard. |
|
itcheg
Joined: 2003-11-30
Posts: 87 |
![]() |
CVS will only delete your files if you use the -C flag, just use -Pd instead |
|
stephenju
![]()
Joined: 2005-07-05
Posts: 172 |
![]() |
Ah... Nice. Thanks. |
|