GetSimple Support Forum
Fancy URLs turned of or on - on the fly..? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Fancy URLs turned of or on - on the fly..? (/showthread.php?tid=3123)



Fancy URLs turned of or on - on the fly..? - widecircle - 2012-04-27

Hi there!
I noticed that even if you turn off fancy urls the .htaccess file is still there but it seems like it's not beeing used.
This got me thinking...is it possible to turn this feuture on or off on the fly & how come the redirection is not taking place eventhough the htaccess file is still there?

Best, Niklas


Fancy URLs turned of or on - on the fly..? - mvlcek - 2012-04-27

widecircle Wrote:Hi there!
I noticed that even if you turn off fancy urls the .htaccess file is still there but it seems like it's not beeing used.
This got me thinking...is it possible to turn this feuture on or off on the fly & how come the redirection is not taking place eventhough the htaccess file is still there?

Best, Niklas

The setting in the administration specifies how links on the website will look like.
The .htaccess file specifies how to translate incoming requests to the only way understood by GetSimple, namely a call to index.php?id=page_slug

Thus, if you switch off fancy URLs it just means that the rules in .htaccess are not needed/used unless someone manually enters an URL with the fancy pattern.
On the other hand, if fancy URLs are switched on, you can still access a page with index.php?id=page_slug.

You could have multiple - non conflicting - rules in your .htaccess and switch between fancy URLs and custom URLs and normal URLs on the fly, e.g. for testing my I18N plugin my local .htaccess file contains rules that support URLs like:
Code:
/index.php?id=slug
/slug
/parent/slug
/parent/slug?lang=de
/de/parent/slug
/parent/slug:de
/parent/slug?page=2
/parent/slug;2
(the examples contain requests for pages in a specific language or for the second page in a "pagified" page)
I can switch the link generation easily in the administration between these different formats but never have to change the .htaccess!


Fancy URLs turned of or on - on the fly..? - widecircle - 2012-04-27

Hi mvlcek!
Thank you for making that clear to me!
Awesome!

Best, Niklas