I have form with checkboxes. Afrer submit url looks like:
www.site.com?mod[]=1&mod[]=2&mod[]=3
How to rewrite url above (apache mod_rewrite) into:
www.site.com/mod:1,2,3
Big problem is that i don't know how many checkboxes will checked
Using just mod_rewrite, I cannot see a way to do this, however, using RewriteMap, you could link to an an external script that would take the query string and return the appropriate new url segments. Then invoke the defined map (program) in your RewriteRule.
Related
I am trying to embed a Qlikview chart in a custom webpage via an iframe - using singleobject.htm. I want to apply a certain filter so i am passing "&select=LB186,CSP" where LB186 is the listbox in the actual qlikview document.
This "select" paramater in the URL doesnt seem to work because of caching. I also tried to replace LB186 by the actual field name, that did not work either.
I want to somehow clear cache and load the page as a fresh reload. appending a random var=XXX hack also doesn't work. Any clue?
You can try to use bookmark instead
alternative url below, please remember that here document part is url encoded:
https://$servername/qvajaxzfc/authenticate.aspx?type=html&try=/qvajaxzfc/singleobject.htm?document=example.qvw%26object%3DDocument\CH1&back=/LoginPage.htm&webticket=$ticket
I want to create a single wufoo form, and embed the form inside my own web pages.
WuFoo has a way to define the redirect URL within their GUI, but I want to make the redirect dynamic based on the REFERER value of where the wufoo data was posted form.
This will allow me to dynamically redirect back to a specific web site based on where the form data was entered.
Does anyone know if there is a way to specify the redirect url in a hiddent form field?
I know that I can create separate forms to accomplish this, but I want all of the entered data to be received in one wufoo form.
There doesn't appear to be any way to access the HTTP_REFERER value in WuFoo's form rules, so I don't think trying to use rules will work.
Apparently there is no way to specify the return url in a form field (according to wufoo tech support).
But you can include hidden fields and use wufoo's rules to return to a URL based on those hidden fields.
In the end, I added code to wordpress's index.php to deal with this.
Is there a way to deny access to a file using one URL, but allow access using another?
Example:
The actual URL is www.domain.com/index.php but I want to refuse access using that URL, but I still want to be able to display the file using www.domain.com/index.php/somestring
Is this possble?
Instead of generating the .htaccess with the strings stored in the DB, you would be better off writing the .htaccess file so that it treats "somestring" as a GET variable. You would then check if "somestring" is in your DB and if it is, you show the page. Otherwise, you do a php header redirect.
.htaccess
RewriteRule ^index.php/([^/]*)$ /index.php?id=$1 [L]
In your index.php first, grab the GET variable, check for it's presence in the DB, and if it is present, then show the page. Otherwise, you can use a header redirect to send the user to a different page.
$id = $_GET['id']; // You will probably want to escape this
Then, wrap the entire page in an if statement and only display the page if the id exists in the database.
I have an install of ELGG, and I set up thewire. I hate the name thewire so I modified the language file, so it would look like posts.
When I looked at the URL on the posts page, it still said http://localhost/thewire, not http://localhost/posts. How would I make .htaccess change the URL to the desired effect.
I tried mod_rewrite, but I don't know what to do with it.
You need to do two things:
Change the URLs produced for thewire posts (register your own handler):
elgg_register_entity_url_handler('object', 'thewire', 'CUSTOM_HANDLER');
Handle new URL format instead of original one:
You may use 'route' plugin hook or try to use already existing plugin for that: http://community.elgg.org/plugins/854839/1.1/pagehandler-hijack-18x
I am very newbie to this. I have a form that has 4 fields. Field1 - 4 method GET. so when i submit the form The url becomes
mydomain.com/page.php?field1=f1&field2=f2&field3=F3&field4=f4.
I want to change this to
mydomain.com/newPath/f1/f2/F3/f4/
You actually want a redirect then. You would rewrite
domain.com/path/a/b/c/d
to
domain.com/path/?w=a&x=b&y=c&z=d
But if you want the server to direct a request like this
domain.com/path/?w=a&x=b&y=c&z=d
to one like this, you are actually redirecting users.
domain.com/path/a/b/c/d
You want a 301 redirect, because then it will hide the new URL with the ampersands:
This is called clean URLs and you can achieve it with regex that accomodate your need in the htaccess file:
Clean URL htaccess