Example
www.domainname.com/page-param1-param2.html
...it will work fine but
www.domainname.com/page-param-1-param2.html
... here param one have the data like param-1 this time url is not working.
How do I get this to work?
...
Okay I have a folder say... http://oldserver.net/file/index.jar
How would I be able to protect the file "index.jar" from being downloaded from regular web browsers?
I've seen this done before, I just want to protect it from being accessed from web browsers, and keep it strictly java download access only.
What I mean by java download a...
I am trying to move my current site over to a new domain, except for ONE directory.
Example:
current site: oldsite.olddomain.example
new site: newdomain.example
So I know I can create an .htaccess redirect entry to do this, and it works, but I want ONE exception - I do NOT want to redirect a specific directory. I still want thi...
I have this in my .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I want this rule to NOT run if the url has /Users or /Forums in the url.
How can I do this?
Upda...
I have a site whose home page shows a single Wordpress category page. I'm using a custom theme and the index.php file there does a 301 redirect to "mysitename.com/?cat=3". This page is generated with an event calendar plugin and a lot of custom code. It works, but the displayed URL is "mysitename.com/?cat=3" which I'd prefer my visito...
so i read stuff about how apache's mod_rewrite does the trick but it seems to be too vague for beginners like me.
lets say i wanted to mask site.com/userpage.php into site.com/ or site.com/userpage
or even removing the get requests..
from site.com/userpage.php?query=yes into site.com/userpage.php or site.com/userpage
how can i do tha...
I am hosting a bunch of files on an Apache server. The files all have an extension of ".plugin" (i.e. filename.plugin ).
The files are actually zip files with the extension changed.
When downloading via Firefox the browser saves the file as "filename.plugin" which is great.
However when using IE it somehow knows this is a ZIP file and...
Hi,
my URL looks like
page.html?L=0&a=1&b=2&c=6 OR
page.html?a=1&b=2&L=0&c=6 OR
page.html?a=1&b=2&c=6&L=0
I need to delete the L=0, where L can be either 0 or 1. But I need to keep all other params. How can this be done?
...
Hi All,
This should be simple but I cannot figure it out. I have this very simple mod_rewrite rule and it just doesn't want to work. This is the entire contents of the .htaccess file.
RewriteEngine On
RewriteRule ^([A-Za-z0-9-_/\.]+)/?$ index.php?page=$1 [L]
If I call the URL domain.com/foo it should rewrite it to index.php?page=foo....
hi, i have a php project which has a configuration file config.php that stores config information like database info, directories, etc.
normally we would include this config file at the top of every php page like require_once(".../config.php); however, i have found a way to do this by creating a .htaccess file and include this:
php_va...
Hi,
I would like to create virtual subdomains through htaccess in the following way.
Entering:
http://testuser.domain.com/1/2/3/
Should be processed as:
http://www.domain.com/user.php?id=testuser&var1=1&var2=2&var3=3
HOWEVER, this rewrite should not use user.php, but index.php, in case someone enters:
http://www.dom...
I have a problem where corporate proxy servers serves up the page for different logged in users. I reckon I can solve this issue by disabling proxy caching. This page suggests including the following snippet in htaccess:
ExpiresDefault A0
Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
Header set Pragma "no-cac...
Hi There,
I'm trying to make the following redirection (301) using .htaccess
*?page=1 redirects to *
(where * is a wildcard).
Basically, I just want to prevent anyone accessing a page with ?page=1 at the end of the URL, and instead direct them to the same url minus '?page=1'.
Is there a quick way of doing this?
Many thanks!
...
How to do the automatic redirect in .htaccess
my urlrewrite worrking fine ,
i want to redirect automatically if user enter the url as query string ,
i dont want to display query string any time,
if query string meets the urlrewrit syntax, then system should automatically redirect
this is my snippet
RewriteRule ^index/result_...
Hiya,
I have a folder structure like this /img/products/{product name}/ and then the sub folders hi, low, and thumb.
I want to use htacess to force-download any files in a 'hi' or 'low' subfolder (but not 'thumb').
I was hoping something like this would work:
<FilesMatch "\(.*)(\/hi|\/low)(.*)">
ForceType applicaton/octet-stream
</Fi...
I recently did a big update on my wordpress site, thus some old permalink are invlid now.
Seach google for a tutorial on this and found a lot about static html page redirection examples or specific php page which are not what i'm looking for
Both my old and new permalinks are in path format, for example, i need redirect a couple urls o...
My question is a follow up of Redirecting URLs temporary with htaccess which was solved thanks to the SO community. I realized that I have a 2010 version of my site and a 2011 version which is about to launch. Both share a same structure but content is different and will be archived as such (not a archived category) because it is a fashi...
I have a URL like so:
http://example.com/one/?ACT=123&gateway=mygateway&method=mymethod&orderID=303&currency=EUR&amount=11&PM=CreditCard&ACCEPTANCE=test123&STATUS=9&CARDNO=XXXXXXXXXXXX1111&ED=0517&CN=Test+test&TRXDATE=08%2F12%2F10&PAYID=7963938&NCERROR=0&BRAND=VISA&ECI=7&a...
I have a system that has both a front end and an administration area.
currently i am giving the admin area a subdomain.
what i'd like to do it have it as a sub directory, e.g http://domain.com/admin
but the admin area is set up to be placed in root.
can i put something in my .htaccess to make the sub directory "/admin" think its the ...
There are some scripts that I use only via ajax and I do not want the user to run these scripts directly from the browser. I use jQuery for making all ajax calls and I keep all of my ajax files in a folder named ajax.
So, I was hoping to create an htaccess file which checks for ajax request (HTTP_X_REQUESTED_WITH) and deny all other re...