Hi
I need to apply a minify actions to all the javascript and CSS files, except the ones I indicate.
I have this condition and rule that applies to all the files (css and js):
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.)(js|css)$ minify.php?q=$1$2 [L,NC]
I need to add the conditions to say:
Apply to all except: jquery.js,...
I have a PHP web app located on shared hosting.
My goal is to modify .htaccess file from PHP code when the PHP page is running.
I need that .htaccess to insert a couple of mod_rewrite lines into it.
The problem is that on Windows+Apache I can dinamically modify .htaccess file
but the same code on Linux reports a problem when I try to ac...
I am developing a number of forms which should only be accessed via https. I have a dedicated server with its own cert and all the good stuff.
So my question is two-fold really:
1). What's the best way to force every request to be https? Is there a better way than this .htacess/mod_rewrite rule:
RewriteCond %{HTTPS} off
RewriteRule (....
I am trying to get Apache to redirect /a.php?a=123 to /b/123 (where 123 could be any number between 1 and 9999) but can't seem to get it to work.
This is what I have in htaccess:
RewriteEngine on
RewriteRule ^a.php?a=([0-9]+) /b/$1 [L]
RewriteRule ^a.php$ /c/ [L]
With this going to a.php?a=123 results in 404, but going to just a.php...
I have an SSL certificate for the 'www' subdomain of a web site we'll call example.com.
Therefore I can force SSL, but if the user doesn't enter 'www.example.com' into their browser, the SSL certificate appears invalid.
I wish to accomplish this with mod_rewrite rules in an .htaccess file at the root of the web site.
No matter what UR...
I am using godaddy and what I want to do is when someone types in a domain address I want it to automatically redirect to a folder rather than placing the files on the root so its more organised.
How do I write this in .htaccess?
...
I'm made a codeigniter app and I tried to use the apache mod_rewrite rules as
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
The problem is that I have this app in a folder abc/ but when I type mysite/abc/something (which should point to mysite/abc/index.php/somethin...
Hello
I am trying to use the following apache configuration on a Godaddy shared hosting account:
<Files ~ ".*">
<IfModule mod_headers.c>
RequestHeader unset Host
RequestHeader append Host mydomain.com
</IfModule>
</Files>
The above is contained in a .htaccess file.
In other words... For all files and paths set the request's host to m...
I am looking to create a system which on signup will create a subdomain on my website for the users account area.
e.g. johndoe.website.com
I think it would be something to do with the .htaccess file and possibly redirecting to another location on the website? I don't actually know. But any information to start me off would be greatly ...
My school internal webserver is still running PHP v4.. (Not sure exactly). I went ahead and wrote all the labs and assignments on my local machine, which is running 5.2.5. Now, none of my code works on the school machine because the functionality simply is not there.
I have access to a slew of compilers, and have downloaded the PHP v5...
Hi guys!
I want to restrict an entire site in such a way that just two IPs could enter the site. I have the following in my .htaccess (at the root of site):
ErrorDocument 403 http://www.example.com/views/error403.html
Order Deny,Allow
Deny from all
Allow from 311.311.311 322.322.322.322
ErrorDocument 404 /views/error404.html
ErrorDoc...
I like to make a .htaccess file to redirect any errors I get from a web site.
I have deleted all pages from the old site. But I have no idea what pages people have bookmaked.
The new webpage and website structure is totally different ... so no page is the same as the old one, not event the index document that changed from index.html to...
I need to rewrite all the files in a directory and essentially make their extentions css instead of php. I want to do with with a .htaccess file within that specific directory.
What is the correct method of doing so and are there any special PHP headers I need to set the ensure the file is read as a .css file correctly?
...
I'm hoping there is a way to do this with mod_rewrite and Apache, but maybe there is another way to consider too.
On my site, I have directories set up for re-skinned versions of the site for clients. If the web root is /home/blah/www, a client directory would be /home/blah/www/clients/abc. When you access the client directory via a w...
Ok guys i have maybe a stupid problem, but i'm probably dumb :)
I have this simple .htaccess:
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^news/([^/]+)$ news-inside.php?n=$1 [L]
RewriteRule ^news/?$ news.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
Every time i try to get into firs...
I'd like to use mod rewrite in to convert web page addresses like /directory to /directory/index.html, in a standard LAMP hosting situation. What I have works for addresses that end in a slash. I can't find a way to handle addresses that don't end a slash.
What seems like it should work is:
rewriterule ^(.*)/$ $1/index.html [L] /* addr...
I've noticed that Magento stores MySQL connection details in an XML file which isn't secured above the docroot. This seems.... well dangerous.
XML seems like a handy way to store config data, except for one thing, typing in http://www.domain.com.au/library/config.xml will show the world your private details!
I went ahead and used an XM...
This is the opposite problem from most about which I have read. I am running Ubuntu 8.04 on an Amazon instance with Apache 2.2.8 and I can't figure out why setting AllowOverride to None for root doesn't stop my .htaccess file from being included.
I have a sub-directory with hello.py in it and an .htaccess file. When I browse to the file...
I am a newb to PHP. Can anyone tell me what each line does here. Do I need this? It is giving me errors
RewriteCond %{REQUEST_URI} /~([^/]+)/?
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /~%1/rewrite.php?p=$1&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_URI} /~([^/]+)/?
RewriteRule ^index\.p...
Is it possible using .htaccess or other apache powers to set a custom server value in the php array $_SERVER.
for example
if($_SERVER['is_special']) {
echo "Yeah for us!";
} else {
echo "No you fool!";
}
I realize I ask a lot of questions that the answer is no so feel free to say so.
...