Hi,
I'm running a site which has 2 separate sub-domains - one for HTTP and another for HTTPS.
http://www.example.com
https://secure.example.com
http://secure.example.com does not exist and will not resolve.
The problem is that the site is running behind a load balancer which handles all SSL. Communication between the load balancer ...
I am writing one web application using PHP/CodeIginter.
Now, I want to add a .htaccess while I am upgrading the application in the server.
The purpose of this .htaccess will be: -
It'll allow normal operation if the user is accessing
from some specific IPs, and
Using a particular host name alias
has a query string parameter "upgradi...
In my .htaccess file I have a set of rules as follows:
RewriteRule ^dir/page1$ /bleh/docs/?id=12 [L,QSA]
RewriteRule ^dir/page2$ /bleh/docs/?id=13 [L,QSA]
RewriteRule ^dir/page3$ /bleh/docs/?id=14 [L,QSA]
Sometimes one of these rules may be accessed via a redirect from another site (referer). I would like to be able to append the refe...
Hey,
I am running Apache2 with multiple vhosts in the sites-enabled folder, each looks a bit like this:
<VirtualHost *:80>
ServerName site1.com
ServerAlias www.site1.com
DocumentRoot /home/sites/site1/www/
<Directory /home/sites/site/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
...
Hello all,
I am attempting clean useful URLs using mod_rewrite. I am sure this is a common question but I am not so hot with mod_rewrite:
I have this URL: http://mysite.com/user.php?user=fatcatmat&sort=popularv
I want to be able to rewrite it like this:
http://mysite.com/user/user/fatcatmat/sort/popularv
(Is there a way to remov...
Hi, let's say I want to use .htaccess to rewrite the following.
Rewriting /user.php?username=xyz to /xyz.
I would use:
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ user.php?username=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ user.php?username=$1
The problem is once this is done, how do I access the username in my other links?
so /mike/d...
Hi, I have a url like this.
/domains/details.php (NOTE: domains is dynamic and can be anything)
How do I remove the domains part from the URL using .htaccess so the actual lookup is:
/details.php
OR it'll be cool if I can get domains into the URL.
/details.php?page=domains
Thanks!
Scott
...
Hi, I'm experimenting with CodeIgniter PHP framework, this framework works like:
http://localhost:7777/~dhalsim/ci/index.php/blog
So, I tried to remove index.php part from there. So far I do these:
make $config['index_page'] = "index.php"; to $config['index_page'] = "";
make $config['uri_protocol'] = "REQUEST_URI"; from $config['uri_...
Running Helicon Isapi rewrite to make overly long coldfusion CMS generated urls 'friendly'. Works very well and we've been using it for several years both with direct rewrites and regex.
I cannot get it to treat urls case insensitively.
The following rule is an example:
RewriteRule /scriptcontent/h1n1/h1n1submission.cfm\?section=Human...
Hi,
I have a below code in mod-rewrite.txt
RewriteEngine On
RewriteRule /\.htaccess$ - [F]
RewriteCond %{HTTP_HOST} !www\.espireinfo\.com$
RewriteRule ^(.*)$ http://www\.espireinfo\.com$1 [R=301,L]
RewriteRule ^/schools/index.aspx$ /schools/english-language.aspx [R=301,L]
RewriteRule ^/about/Contact.aspx$ /about/contact.aspx [R=3...
Here's a redirect I have:
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ user.php?username=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ user.php?username=$1
The problem is if I type http://www.example.com/apple it's OK when it comes to my links on the page.
BUT if I use http://www.example.com/apple/ (notice last slash) then links are all scre...
Menu code:
<a href="/category/<?=$cat_name['id']?>/<?=simpleURI($cat_name['catname'])?>/" title="<?=ucfirst($cat_name['catname']); ?>">Level 1</a>
<a href="/category/<?=$subcat_name['id']?>/<?=simpleURI($cat_name['catname'])?>/<?=simpleURI($subcat_name['catname'])?>/" title="<?=ucfirst($subcat_name['catname']); ?>">Level 2</a>
<a href...
Redirecting a visitor who hits http://example.com to http://www.example.com isn't terribly difficult. But how is it done in conjunction with a RewriteRule that directs all page requests through "index.php"?
RewriteRule !\.(gif|jpg|png|css|js|php|ico|xml)$ /index.php
...
Hi,
I told wordpress that I wanted urls to look like:
domain.com/postname.html
I want to pass a parameter to a wordpress plugin. So when I get
domain.com/postname.html.2 it is suppose to be domain.com/postname.html?tubepress_page=2
With the following the parameter is passed correctly, but not the name.
This is the .htaccess file:
<I...
I work for company that links out to partners through a third party website that tracks them. So for example on our site there will be an outgoing link something like this (names changed to protect my work):
<a href="link.php?link=chuckecheese">check it out kids!</a>
if you go into link.php, you see I define the link there:
$outlink...
I'm thinking of using an apache reverse proxy and an SSL certificate to secure surfing by various laptops roaming about in wireless land. My thought was have the users set this https proxy as their proxy in their web browsers, but I haven't found a way of redirecting them immediately to pages on external websites like http://www.msdn.mi...
I have two domains, cshen.ca and cshen.net, both point to the same place.
I'm trying to accomplish the following with mod_rewrite:
cshen.net is 301 redirected to cshen.ca
www.cshen.net or www.cshen.ca are both redirected to cshen.ca
the path after the domain is preserved after being redirected, for example www.cshen.net/foo/bar/ would...
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
##RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !\.(js|ico|gif|jpg|png|css)$ [NC]
RewriteCond %{REQUEST_FILENAME} !^index.php [NC]
RewriteCond %{REQUEST_FILENAME} !^$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
## RewriteRule ^/([a-zA-Z_+-]+).php$ index.php?p=%1...
I want to use Helicon ISAPI Rewrite to redirect an old URL to a new URL, but only within a virtual directory named colors:
http://www.mydomain.com/colors/default.aspx?id=blue
needs to redirect to
http://www.newdomain.org/colors/default.aspx?id=blue
I am new to this and cannot find an appropriate example, so any help would be appreci...
I have this rewrite rule to access profile.php?user=username with mysite.com/username..
Problem with this is that it ignores my css, even if I use the full URL and whats weird is that its the same if i go to the regular url, profile.php?user=username. But If i remove my htaccess file the css works.
RewriteEngine on
RewriteRule (.*) pro...