Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pagename that ends with a questionmark #19

Closed
kroovysteph opened this issue Jan 29, 2017 · 2 comments
Closed

pagename that ends with a questionmark #19

kroovysteph opened this issue Jan 29, 2017 · 2 comments

Comments

@kroovysteph
Copy link

@robiso
in the menu bar at the top, if you have a pagename that ends with a questionmark then the highlighting doesn't work anymore.

my setup:
Server version: Apache/2.4.18 (Ubuntu)

example:
in the following example, if you click on "FRAGEN?" it will not highlight as it is supposed to do.

should be easy to reproduce and hopefully easy to solve.

kind regards
kroovy

@robiso
Copy link
Collaborator

robiso commented Jan 29, 2017

@kroovysteph
I'll explain on how this is possible, but first why I would not recommended doing this.
In general, items in the menu are not supposed to include special characters.
WonderCMS without .htaccess would write URLs like http://example.com/index.php?page=pageName. With the help of a simple rewrite rule RewriteRule ^(.+)$ index.php?page=$1 [QSA,L], we replace that part by just delivering http://example.com/pageName.
Because of the QSA parameter, a query string is passed with the original URL and is appended to rewrite it in a way that your URL pageName?param=1 becomes index.php?pageName&param=1, thus rendering it incorrectly (notice the ? -> &).

One way of making this work would be:

  1. Removing the rewrite line from .htaccess, but by doing this - clean URL's will no longer be working.
  2. Edit menu to include index.php?page= in your menu links.
  3. You will be able to have question marks in your menu links, they'll be also highlighted. For example, your URL would be http://example.com/index.php?page=yourpage? (and highlighted).

@kroovysteph
Copy link
Author

kroovysteph commented Feb 1, 2017

ah, you are right!
knowing that I would prefer clean URL's...
thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants