Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fancy URLs turned of or on - on the fly..?
#1
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
Reply
#2
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!
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#3
Hi mvlcek!
Thank you for making that clear to me!
Awesome!

Best, Niklas
Reply




Users browsing this thread: 1 Guest(s)