I have the following code which works perfectly, but I want to allow access to the /assets directory?
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^.* controller.php
AddHandler php5-script .php
Could someone give me a little line of code or two to help?
...
I have already have this code to force these URLs to HTTPS:
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^/my/?.*$
RewriteCond %{REQUEST_URI} !^/my/basket/add?.*$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^/login/?.*$
RewriteCond %{REQUEST_URI} ^/logout/?.*$...
I have a PHP script masquerading as JS in order to dynamically include and pack various JS files to serve as one.
I'm having trouble getting it to cache: the headers don't seem to want to set.
$expires = 60*60*24*14;
header("Pragma: public");
header("Cache-Control: maxage=".$expires);
header('Expires: ' . gmdate('D, d M Y H:i:s', time(...
Hi,
Im trying to set up some cache control options in my htaccess file.
At the moment it looks like this:
<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf|css|js|html|pdf)$">
Header set Cache-Control "max-age=2592000, public, must-revalidate"
Header unset ETag
FileETag None
</FilesMatch>
However I read about (and wanted to add) Header u...
I'd like to restrict access to my Rails app (running on Apache/Passenger) to just two IPs, but if the visitor doesn't fall into those two IPs, I would like for him/her to be prompted to enter a password that would allow any user with the proper credentials to access the site from anywhere.
I am new to configuring Apache and would apprec...
hi,
I've added some php flags in my htaccess in order to change some php
config settings
as I dont have access to the .ini file
I'm wondering what effect that has on my website load speed,
is it slower?
thanks
...
hi,
I'm trying to configure .htaccess of my website.
http://213.175.210.49/~incisozl/ is the temporary url to the root(~/public_html/).
when I try to rewrite the url at .htaccess i get an
/home/incisozl/public_html/.htaccess: RewriteBase: argument is not a valid URL, referer: ht tp://213.175.210.49/~incisozl/inci-sozluk/somestrin...
Hello, I need to use .htaccess file to replace a world in URL
something like this:
example URL: www.hotourism.com/banknotes/banknotes/asia/vietnam/
redirect to: www.hotourism.com/countries-banknotes/banknotes/asia/vietnam/
how can I use mod_rewrite to redirect every URL containt "/banknotes/banknotes/" to the same URL after replacing...
I've modified my .htaccess file to have the following statement
RewriteCond $1 !^index.php$
RewriteRule ^/?([^/]+)$ index.php?c=home&m=details&seo=$1 [L,NS]
This allows me to use product URL's like this: http://domain.com/product_name
However, when trying to access a file at the same level as index.php, it always calls the RewriteRul...
Currently I am creating a project with CodeIgniter that is contained within a subdirectory of my domain. For this example we'll call it domain.com/test.
I also have Wordpress installed on this domain, and all of its files are in the root. For instance, if you navigate to my domain.com then it pulls up the Wordpress blog. I currently hav...
I am using the following code to attempt to redirect a dynamic URL to a new dynamic URL, under the same domain:
RewriteRule ^products/item/^\d([^/]+) /product/$1/ [R=301,L]
I've tried these too:
RewriteRule ^products/item/[^\d]([^/]+) /product/$1/ [R=301,L]
RewriteRule ^products/item/[0-9]([^/]+) /product/$1/ [R=301,L]
But this was...
I can't hide Codeigniter index.php on XAMPP 1.7.3
URL:
http://localhost/Servidor/agentesRainbow/index.php/agentes/tony
tony is an argument
My actual .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /Servidor/agentesRainbow/
#'system' can be replaced if you have renamed your system folder....
Currently I use a .htaccess redirect to send a (nice) url /offices/london/whatever to my script (nasty url) /db/db.pl?offices-london-whatever
i want the browser url to be nice, with the 301 redirect it isn't so i tried with the RewriteRule but the browser url is still the nasty one.
e.g. RewriteRule Offices/London/(.*)$ /db/db.pl?Offic...
I just finished moving files from my system to my web host and I am getting this error. I have manually changed the permissions of the tmp folder they are referring to but I keep getting the errror. Please could someone tell me what the problem could be
Fatal error: Uncaught exception 'Exception' with message 'Please make sure the /hom...
I am trying to set-up my localhost development server. I have everything working but when I try to add an .htaccess it throws this error:
Internal Server Error
The server encountered an internal error or misconfiguration and
was unable to complete your request.
Please contact the server administrator, [no address given] and
inform t...
I am using .htaccess files to control access to various Apache2 directories. I have a main "password" file that contains usernames and passwords. All the instructions I have found regarding .htaccess talk about how the passwords added are encrypted. The usernames and passwords are created using the following command line syntax ...
htpa...
Instead of www.example.com/author/xyz, I want to use www.example.com/artist/xyz.
I was hoping it was as easy as copying author.php to artist.php in my theme directory, but no such luck. Where does wordpress handle the special processing for the author archive pages?
.htaccess rewriting is another option, but I wasn't able to get anythi...
Hello,
I'm trying to install Symfony on a shared server and am attempting to duplicate the httpd.conf command:
# Be sure to only have this line once in your configuration
NameVirtualHost 127.0.0.1:8080
# This is the configuration for your project
Listen 127.0.0.1:8080
<VirtualHost 127.0.0.1:8080>
DocumentRoot "/home/sfproject/web"
...
I have an online store that i have recently re-written most of and would like to upload it to my server. While the maintenance is taking place, i would like to redirect all visitors to an "under construction" page. (easily done with php or apache htacess etc...)
The issue is that I would like to test everything when i upload it so i sti...
Hello all,
Two things:
Firstly - I have version 2 of a website located in a folder named v2, and I want to redirect any traffic that is NOT a child of the v2 folder, to www.example.com/v2
The old site located in the root was created in iWeb and has a LOT of subfolders and sub-subfolders.
So:
www.example.com/v2 = New site
www.exam...