Questions tagged [qsa]

19 questions
88
votes
3 answers

What is L in [QSA, L] in htaccess

QSA means that if there's a query string passed with the original URL, it will be appended to the rewrite (olle?p=1 will be rewritten as index.php?url=olle&p=1. L means if the rule matches, don't process any more RewriteRules below this…
stackoverflower
  • 919
  • 1
  • 7
  • 5
9
votes
3 answers

When to use querySelectorAll

In a piece of example code I wrote var as = toArray(document.getElementsByClassName("false")).filter(function (el) { return el.tagName === "A"; }); And I was thinking I could replace that with var as = document.querySelectorAll("a.false"); Now…
Raynos
  • 166,823
  • 56
  • 351
  • 396
3
votes
3 answers

Why $_POST is empty when using [QSA] in .htaccess?

I've got the following in .htaccess: RewriteCond %{REQUEST_URI} !app/index\.php$ RewriteRule ^(.*\.htm)$ index.php?url=$0 [QSA,L] Everyting works great but result URLs have empty $_POST. I'm 100% sure that it's mod_rewrite bug, not HTML or PHP…
luchaninov
  • 6,792
  • 6
  • 60
  • 75
2
votes
6 answers

How to combine query strings in PHP

Given a url, and a query string, how can I get the url resulting from the combination of the query string with the url? I'm looking for functionality similar to .htaccess's qsa. I realize this would be fairly trivial to implement completely by hand,…
Cam
  • 14,930
  • 16
  • 77
  • 128
1
vote
2 answers

IE7: How do I create a real NodeList?

I'm trying to make my current project IE7-compatible. We are not using jQuery, but instead using querySelectorAll for our selector needs. However, IE7 doesn't support querySelectorAll, so I've monkey-patched it with code from…
Nikolai Prokoschenko
  • 8,465
  • 11
  • 58
  • 97
1
vote
1 answer

htaccess using QSA returning 404

I'm trying to direct a url for a blog post to a PHP page that takes a GET var using htaccess. RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^blog/post/(\w+)$ blog/post.php?title=$1 [QSA,L] However, this just gives me a 404. I have confirmed that…
smulholland2
  • 1,143
  • 2
  • 14
  • 28
1
vote
0 answers

htaccess rewrite sometimes works sometimes does not

I have a rule that I need to apply in multiple instances. I'm just testing one right now, but the results are inconsistent. Here is the rule: RewriteRule ^sub1/(pagename)(/)? sub2/$1$2 [L,QSA] I'm not sure if the (/)? actually works; some…
J Esters
  • 11
  • 2
1
vote
1 answer

Mod_rewrite (htaccess) QSA and removing charactes from appended query string

I've been struggling with some htaccess redirects. I just spent some time reading and searching and couldn't get a solution that works with my scenario. I'm in the process of making the 301 redirect for an old website (ASP) to a new one (Wordpress).…
JackTheKnife
  • 3,795
  • 8
  • 57
  • 117
1
vote
1 answer

How to Ignore query string in a URL?

Hello I have something like this: if(isset($_POST['btnProm'])){ $idads = mysql_real_escape_string($_POST['idAds']); require_once("adPromFrm.php"); } When a button is pressed, a form will appear.... When i refresh the page, the form…
jartaud
  • 375
  • 5
  • 19
0
votes
1 answer

Rewrite url: serve both query string and block urls

my journey of learning MVC continues and as hard as it is, I'm learning a lot of things I could never learn otherwise. Now I have faced the problem in routing. Currently I'm taking the $_SERVER["REQUEST_URI"] and get the controller and method and…
Stefano Mtangoo
  • 6,017
  • 6
  • 47
  • 93
0
votes
1 answer

QSA's children objects deletion problem

I've some problems with deleting QSA's referred objects. In constructor, I've wrote: QSProject * project = {initialization of QSProject} MyWrapper * wrapper = new MyWrapper; // MyWrapper is QObject's child. It comes without parent here …
Arenim
  • 4,097
  • 3
  • 21
  • 31
0
votes
1 answer

add string at the end of URL using htaccess which has query string also

I want to change domain.com/division1/index.php?members/maxmusterman.5 to domain.com/division1/index.php?members/maxmusterman.5/#div That is if the URL contains index.php?members, then I add /#div at the end of url. I tried this RewriteEngine…
TheTechGuy
  • 16,560
  • 16
  • 115
  • 136
0
votes
2 answers

web server not including query string when performing a .htaccess URI rewrite

I have published some webpage code on GitHub and it is used by quite a few people without issue. But, just recently, a person contacted me to let me know that they are having an issue with an image not displaying properly. The image is generated…
tyger07
  • 1
  • 2
0
votes
1 answer

Limit the redirection of pages using htaccess file

I want to redirect some pages of my site. These pages have the following form: xxxx.html (x=digit, up to 4 digits), eg 1.html, 24.html, 6875.html etc I want to redirect these pages to the following format: index.php?id=xxxx. The solution I have…
George
  • 129
  • 2
  • 12
0
votes
1 answer

Htaccess appending to query string with QSA without redirect

I am trying to add English version to my website in subdomain level as following: en.mywebsite.com/business-name : This will show the English version of a sub-page. Right now I have actually achieved it somehow by appending the subdomain to the…
Uğur
  • 13
  • 2
1
2