.html Url
asianventure
![]()
Joined: 2010-10-23
Posts: 3 |
![]() |
Hi, Thanks |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
No way to do that currently without modifying the code. Might not be a hard modification to make, though. |
|
tempg
Joined: 2005-12-17
Posts: 1857 |
![]() |
It can be done in the .htaccess file if you just want to add .html to the end of all urls. |
|
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
I believe there's an option in the application/config/config.php file for this... If you edit line #62 to set url_suffix to .html, all the URLs gallery generates will end in .html (but the URL will still work without .html as well): |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Oh wow that is awesome -- I didn't even know about that Kohana feature! |
|
tempg
Joined: 2005-12-17
Posts: 1857 |
![]() |
Okay, I've spent about 3 hours on this; I'm ALMOST certain that the issue is the edit to the config file. I noticed today that the "organize album" panel/window/function no longer worked properly. I began rolling back all the changes I've been making. I'm now 98% sure that if you make the change above (line #62 of the config file), "organize album" no longer functions. I've been trying to figure out how to work around it. No luck. The solution should be simple: but that's not working. (I also noticed that the framework already tries to do that.) |
|
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
That's weird. It looks like editing the config file to enable dummy .html urls somehow breaks the REST module, which the organize module uses when you click on the organize album link (so anything else that's REST dependent will also be broken). As the album and photo pages function properly regardless of if the dummy .html suffix is present in the URL, I'm not sure why the REST module would have an issue with it. |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Ah, yeah I tracked this down. So the problem is that we compare against generated absolute urls using url::abs_site and url::abs_current when we parse the REST urls. That code wasn't taking into account a url_suffix. I just submitted a change to fix that. Ticket: Fixed in 3.0.x and master. |
|
tempg
Joined: 2005-12-17
Posts: 1857 |
![]() |
Thanks @rWatcher @bharat. |
|
glodakan
![]()
Joined: 2010-06-13
Posts: 51 |
![]() |
problem in tag page if using .html .... how i can fix it ? |
|
tempg
Joined: 2005-12-17
Posts: 1857 |
![]() |
@glodakan: What do you mean? What is the problem? What do you mean by "tag page"? |
|
glodakan
![]()
Joined: 2010-06-13
Posts: 51 |
![]() |
tempg wrote:
@glodakan: What do you mean? What is the problem? What do you mean by "tag page"? photo by tag can't displaying bro.. |
|
MarkRH
Joined: 2007-05-25
Posts: 241 |
![]() |
You'll probably need to add the following internal RewriteRule in the .htaccess before the RewriteCond statements that Gallery uses so that it's changed back to a format Gallery understands: <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^tag/(.*)\.html$ tag/$1 [NC,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L] RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L] RewriteRule ^index.php/(.*) $1 [QSA,R,L] </IfModule> I guess it doesn't automatically take account for the URL suffix in the case of tags. Thanks, Using Gallery 3.0.1 - gallery.markheadrick.com |
|
glodakan
![]()
Joined: 2010-06-13
Posts: 51 |
![]() |
@MarkRH : cannot work for me.. |
|