This is my entire mod_rewrite condition:
<IfModule mod_rewrite.c>
<Directory /var/www/>
Options FollowSymLinks -Multiviews
AllowOverride None
Order allow,deny
allow from all
RewriteEngine On
# force www.
I have the following in my htaccess:
#When your application folder isn't in the system folder
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ?/$1 [L]
#No WWW
RewriteCond %{HTTP_HOST} !^myrealdomain.com$ [NC]
RewriteRu
Consider this code:
RewriteEngine On
RewriteRule ^$ http://%{HTTP_HOST}:8177/index.jsp [C]
RewriteRule ^http://([^:]+):([^/]+)(.*) http://$1:8177$3 [R=301]
RewriteRule ^/$ http://%{HTTP_HOST}:8177/index.jsp [C]
RewriteRule ^http://([^:]+):([^/]+)(.*) http://$1:8177$3 [R=301]
RewriteCond %{REQUEST_URI} card.*
RewriteRule ^ - [L]
RewriteCond %{REQUEST_URI} Voucher.*
RewriteRule ^ - [L]
Rewr
I have two virtualhosts configured with xampp on mac os x snow lion.
I am new to using regular expressions for rewriting URL's in htaccess
I need to redirect mysite.com/123 to mysite.com/, IF cookie named 'ref' is set.
my current htaccess is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_COOKIE} ref=true [NC]
RewriteRule ^/([0-9]+)/$ http://www.mysite.com
</IfModule>
The goal is that when someone enters site with: mysit
I created a .htaccess file that does two things: redirects http to https and also www. to non-www.
The goal is to have every page (minus one folder) of a site redirect to https. I've discovered the following does not do that. The one folder contains a subdomain.
My .htaccess file, which I wanna use with lighttpd:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.(html|wsdl|json|xml)$
RewriteRule .* - [L]
RewriteRule ^(.*)$ index.php?url=$1 [NC,QSA,L]
</IfModule>
# Stop people accessing directories they shouldn't have access to
RedirectMatch 403 ^/\.svn(/|$)
I have an ErrorDocument directive in my .htaccess:
ErrorDocument 403 /index.php?http_status=403
Then I'm redirecting requests to "www." with this:
RewriteCond %{HTTP_HOST} !^www\.