I am trying to protect the ~/public_html/dev directory using http auth basic, but to make that secure I want to run it over ssl.
The middle section of the below .htaccess file switches to https if the request URI begins with /dev and works.
The last section of the file works as well but does not work properly with the https redirect.
...
Hiya,
I'm trying to find out how to edit my htaccess to push all requests for files in:
http://www.domain.com/images
to head off to:
http://cdn.domain.com/images
The reasoning being i'd like to parrelise http requests over a number of domains/subdomains to speed up page load. Is this possible through apache scripting, or will I hav...
Hi,
I am using mod_rewrite to create SEO URLs. Basically the thing works in the following way:
all requests are caught by .htaccess and redirected to a php script (let's say transform.php). transform.php parses SEO URL and transforms it into a normal URL, then includes index.php, then catches application's (index.php's) output and uses ...
Hi,
I'm trying to understand the following lines in joomla's .htaccess file. Can someone explain this please
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} !^/index.php
#RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
#RewriteRule (.*) index.php
...
hello to all,
i'm doing maintenance work on a cms and have found the following htaccess file:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
i'm having trouble understanding it.
the reason a...
How to :
domain.com.ua/e107_plugins/forum/forum_viewtopic.php?847 redirect to domain.com.ua/blog.php?blog=1847
847 + 1000- it's new ID valud.
Thank you
...
I am redirecting all requests like so:
RewriteRule ^sitemap.xml$ sitemap.php?/ [QSA,L]
# the line below is the one I'm having trouble with
RewriteCond %{REQUEST_URI} !^market-reports$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php?section=$1 [QSA,L]
All my incoming links are mea...
Ok, I am using codeigniter and I have a secure login section. Inside the login users are able to download files.
What I need to do is stop people been able to access the file directly. I figure there will be a way using .htaccess to check for a authenticated variable that I could set in the POST array or something similar.
Any pointers...
well, ofcourse its not working, im still a n00b :)
this is the code that i have :
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)\.css - [S=7]
RewriteRule (.*)\.jpg - [S=6]
RewriteRule ^gallery gallery.html [L]
RewriteRule (.*)/(.*)/ index.html?page=$2 [L]
RewriteRule (.*)/(.*) index.html?page=$2 [L]
RewriteRule (.*)/ index....
I am making a site with photo albums for agents.
Each agent has his folder with .css file.
Each agent dir has album folders with index.php and .css
/example.com/
/agent001/
agent001.css
/000005/
index.php
main.css
/photos/
aaa.jpg
bbb.jpg
/000006/
index.php
...
I've been fighting this for a while and can't seem to make it work. My old system used a lot of query strings to render pages but they are no longer necessary. My url is below:
OLD URL: www.example.com/links.php?section=5&catid=52
NEW URL: www.example.com/mhfs/links
The name links is coincidental and not necessarily from the old pa...
Hi,
I'd like to redirect http://www.mydomain.com/service to http://www.mydomain.com:PORT where PORT is the port of the service which will serve the pages.
Is it possible given it's apache which is listening on port 80 so which will perform the redirection, and it's an unrelated service which is listening on PORT?
What's the syntax? I ...
I'm transferring an ASP.NET site to WordPress, and all my URLs are identical, except for the .aspx suffix.
Is there a one line regex htaccess solution that will forward people from
foo.com/bar/page.aspx
to
foo.com/bar/page
and
foo.com/bar.aspx
to
foo.com/bar
...
I would like to send URL requests to a PHP script which will handle the 301.
The URI's I want to capture are dates, like 26-11-2010, without the dashes:
www.mysite.com/261110/ (6 digits)
What is the RewriteRule for this?
my script is
www.mysite.com/redirect.php?data=261110
...
I have a website located at example.com/cmsFolder which I want to move to example.com/newFolder. I can't manually move this as it completely breaks this stupid CMS.
So I'm trying to use mod_rewrite to mask the folder name and keep it looking nice.
RewriteEngine on
RewriteRule ^cmsFolder/(.*)$ /newFolder/$1 [L]
That fails with a 404. ...
I am trying to run iJab with Openfire server which requires me to redirect the /http-bind request to localhost:7070/http-bind.
I copied the iJAb folder into my document root and wrote the following code inside .htaccess file within the directory
AddDefaultCharset UTF-8
Options +FollowSymLinks
Options +Indexes
Options +...
I am new to mod_rewrite and have been using a generator but it doesn't work.
This is an example of what I am trying to achieve.
The original URL:
http://subdomain.domain.com/company.php?test=TES001
The rewritten URL:
http://subdomain.domain.com/company/AAA001
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule company/...
I have apache setup to wildcard direct all unknown trafic to one php script (default documentroot). This php script looks into a database and possibly finds the correct documentroot for the requested domain (or documetroot of the 404 error handler etc..).
The problem is, that from within php script I know how to include another script,...
Hi,
I'm running zend server on windows 7.
I'm using the htaccess from jooml:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GL...
Hi
I have a CakePHP installation in a sub folder in my server, I want to install another application inside that subfolder:
root/public_html/subfolder/cake/
root/public_html/subfolder/app/
etc. now I need a custom application installed there:
root/public_html/subfolder/my_custom_application/
I have something like this in my .htac...