(2013-04-11, 02:27:43)Carlos Wrote:The site was screwed up totally, the settingsdidn't show up even after I re-enabled GS Fancy URLs. I restored a previous version and edited what was needed to get back to the current state and everything is different now.(2013-04-11, 00:33:57)TeeJay Wrote: Just to try if your solution for non-fancy URLs of NM works, I wanted to turn the NM's Pretty URLs off and the settings of Pretty URLs has disappeared for some still unknown reason so I could not turn it off. I have to search the problem.
Enable GS fancy urls, then go to NM settings. The setting should then be available again.
I tried all the reasonable options. In all cases, .htacces included this:
Code:
# News Manager:
RewriteRule ^clanky/tag/([^/.]+)/?$ index.php?id=clanky&tag=$1 [L]
RewriteRule ^clanky/post/([^/.]+)/?$ index.php?id=clanky&post=$1 [L]
RewriteRule ^clanky/page/([^/.]+)/?$ index.php?id=clanky&page=$1 [L]
RewriteRule ^clanky/archive/([^/.]+)/?$ index.php?id=clanky&archive=$1 [L]
# end News Manager
With GS Fancy URLSs on and NM Fancy URLs off and no custom permalink structure, everything is okay and your code above is not needed. But I want also NM Fancy URLs on.
In this case, .htacces must include this
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [QSA,L]
Both GS and NM Fancy URLs on and no custom permalink structure. Everything is okay then, but you have the same address for both the English and Czech pages.
.htaccess must include only basics,
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
With GS Fancy URLs on and NM Fancy URLs off and this custom permalink structure:
Code:
%nondefaultlanguage%/%parent%/%slug%/
In this case, .htaccess includes
Code:
RewriteRule ^/?$ cs/ [R,L] # optional
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(cs|en)/(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$3&lang=$1 [QSA,L]
RewriteRule ^(cs|en)/?$ index.php?lang=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$2&lang=en [QSA,L]
With all Fancy URLs (GS and NM) on and this custom permalink structure
Code:
%nondefaultlanguage%/%parent%/%slug%/
.htacces is the same as in the previous case - includes:
Code:
RewriteRule ^/?$ cs/ [R,L] # optional
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(cs|en)/(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$3&lang=$1 [QSA,L]
RewriteRule ^(cs|en)/?$ index.php?lang=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$2&lang=en [QSA,L]
Strange is that after I played with these setups and then set up this last and best looking setup (everything on) again, it suddenly didn't work (but it did before). I think it could be some cache problem. However, I deleted cache and nothing solved it. Then I reuploaded my backup and set this settings again and it worked again!
To conclude, there are a 4 possibilities how to "live"
1) GS Fancies on, NM fancies on, no custom permalink structure
- working
2) GS Fancies on, NM fancies off, no custom permalink structure
- working
3) GS Fancies on, NM fancies on, custom permalink structure
- NM posts not working when changed address with language part like /en/ etc., NM posts work only in the site's default language, otherwise it works
4) GS Fancies on, NM fancies off, custom permalink structure
- absolutely not working, cannot switch languages, but NM posts work
- strange, I think there is an error somewhere; but the setup is the same as in 3) and everything not working here works there.
So the only reasonable and fully working option is 2) so far. Nevertheless, if there could be solved the problem with either /en/ or nothing in an address for NM, it would be perfect. (I think about some easy if, but I don't know how to formulate it there). Never mind, thanks for trying to help
Tom
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
» The little I did for GetSimple