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

Mod rewrite rules ignored #267

Closed
jstamant opened this issue Oct 26, 2015 · 2 comments · Fixed by #252
Closed

Mod rewrite rules ignored #267

jstamant opened this issue Oct 26, 2015 · 2 comments · Fixed by #252

Comments

@jstamant
Copy link

I'm trying to add some lines to my .htaccess to implement friendlier URLs, but rules I add on top of the provided .htaccess have no effect.

I'm sure my rules are correct, because I can observe the rewrite with the $_SERVER['REDIRECT_URL'] php variable.

I browsed the source code and here is what I noticed: the file that pico loads is derived entirely from $_SERVER['REQUEST_URI'] (found on these lines), and I'm sure that using this variable instead of $_SERVER['REDIRECT_URL'] is what is ignoring my rewrite rules.

I love how pico is small and barebones/concise, and I really want it to stay that way. Is it within pico's scope to support mod_rewrite? As I understand, the $_SERVER['REDIRECT_URL'] variable is an apache-specific variable, so that's another thing to consider: is pico meant to be portable across all web-servers? Or just on apache? If it's designed for portability, I guess I'll need to write a plugin to do this.

@jstamant jstamant changed the title Mod rewrite not used Mod rewrite rules ignored Oct 26, 2015
@PhrozenByte
Copy link
Collaborator

The routing system will be completely overhauled with our upcoming Pico 1.0 release, see #252. Feedback is appreciated!

@PhrozenByte PhrozenByte mentioned this issue Oct 26, 2015
@jstamant
Copy link
Author

Thanks. Reading #252 gave me a better idea what pico has in mind for portability across different web servers. Only makes sense to use query strings.

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

Successfully merging a pull request may close this issue.

3 participants