Re: Redirect non-www to www cons? Digital Media Digital Marketing Search Engine Strategies by Read a Book … have code in `.htaccess` file ` # Redirect non-www to www RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301… Re: Redirect non-www to www cons? Digital Media Digital Marketing Search Engine Strategies by Read a Book … URL's # Rewrite product URLs RewriteRule ^product/index\.php$ - [L] RewriteCond %{QUERY_STRING} mainCategory=([^&]+)&productName=([^&]+)&product_id=([^&]+) RewriteRule… rewritecond for without extension is not working Programming Web Development by abhi10kumar … code of .htaccess: [CODE] Options +FollowSymLinks Options +Indexes RewriteEngine on RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/ RewriteRule …^(.*)index\.php$ /$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]*)$ /products.php?pname=$1 [L] … Re: RewriteCond question Programming Web Development by klemme …answer!! I have just tried to test this: [CODE] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(Forside|SEO|CMS|Hosting|Referencer|… files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L] … Re: RewriteCond question Programming Web Development by madCoder … server and php would expect. For example: [CODE=apache] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(cms|admin|client|public)/(.*) $1… files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L]… RewriteCond and RewriteRule Hardware and Software Linux and Unix by jvc … help me PLEASE. I have the conditions and rules below RewriteCond %{REQUEST_URI} ^/kid.html [OR] RewriteRule ^(.*)\.html$ - [C,E=id:24…] RewriteCond %{REQUEST_URI} ^/baby.html [OR] RewriteRule ^(.*)\.html$ - [C,E=id:25] … RewriteCond question Programming Web Development by klemme … abslutely nothing: [CODE] <ifModule mod_rewrite.c> RewriteEngine On RewriteCond %{QUERY_STRING} ^sid=1&titel=FORSIDE$ RewriteRule ^Forside$ /index.php…] Dont I need to match the query string in the RewriteCond, and then in the RewriteRule below it, just state how… Re: RewriteCond question Programming Web Development by madCoder … files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([0-9]+)/(.*)$ /index.php?sid=$1… RewriteCond: Less than 5 minutes old Hardware and Software Linux and Unix by hknight Using mod_rewrite I use this to test if a file exists: [code]RewriteCond /home/myact/public_html/pagecache%{REQUEST_URI}/index.html -f[/code] How can I test if the file exists and is less than 5 minutes old? Re: RewriteCond: Less than 5 minutes old Hardware and Software Linux and Unix by hknight [QUOTE=khess;1202097]Using a script or from within Apache?[/QUOTE] I would like to do this as a RewriteCond Re: RewriteCond: Less than 5 minutes old Hardware and Software Linux and Unix by khess I think you will need to use a CondPattern in that RewriteCond but not sure if it will work. The CondPattern takes on a perl syntax. So, if you can test it with a Perl test, you'll have it. Sorry, that I don't have more info on that. I've never heard of this type of need before. Re: RewriteCond: Less than 5 minutes old Hardware and Software Linux and Unix by hknight … think you will need to use a CondPattern in that RewriteCond but not sure if it will work. The CondPattern takes… Re: .htccaccess RewriteCond & RewriteRule syntax Programming Web Development by Dani RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule ^(.*)$ http\:\/\/domain.com\/$1 [R=301,L] Have you tried simply swapping out where the www is? .htccaccess RewriteCond & RewriteRule syntax Programming Web Development by techman41973 I'm switching servers and need to change the following RewriteCond & RewriteRule commands in the .htaccess file. Right now I'…m pointing domain.com to www.domain.com RewriteCond %{HTTP_HOST} ^domain.com$ RewriteRule ^(.*)$ "http\:\/\/www\.domain\.com\/$1… Re: .htccaccess RewriteCond & RewriteRule syntax Programming Web Development by Dani I might be wrong about escaping the http:// part. I removed the double quotes that you had b/c I had never seen that before. This **should** work: RewriteCond %{HTTP_HOST} ^domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] Re: rewritecond for without extension is not working Programming Web Development by diafol try this: [url]http://www.generateit.net/mod-rewrite/[/url] Re: RewriteCond: Less than 5 minutes old Hardware and Software Linux and Unix by khess Using a script or from within Apache? Re: .htccaccess RewriteCond & RewriteRule syntax Programming Web Development by techman41973 OK, I'll try this. Are you sure this is the right syntax. I'd rather not experiment, since I'm following specific instructions from my host provider and at some point loose access to the VPS that I'm adding this code to. Re: Ignore folder in .htaccess file Programming Web Development by blocblue `RewriteCond %{REQUEST_URI} !/admin/.*$` A little .htaccess help please? Community Center by TeamRocket … [OR] RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR] RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR] RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR] RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR] RewriteCond %{HTTP_USER_AGENT… Re: A little .htaccess help please? Community Center by TeamRocket … [OR] RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR] RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR] RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR] RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR] RewriteCond %{HTTP_USER_AGENT… php and mod_rewrite problem Programming Web Development by trs21219 … [OR] RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR] RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR] RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR] RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR] RewriteCond %{HTTP_USER_AGENT… Re: htaccess file Digital Media UI / UX Design by almostbob …[OR] RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR] RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR] RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR] RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR] RewriteCond %{HTTP_USER_AGENT… Error when using .htaccess redirect to mobile section of my website Digital Media UI / UX Design by jonlloydd … On RewriteBase / # Check if this is the noredirect query string RewriteCond %{QUERY_STRING} (^|&)m=0(&|$) # Set a cookie, and … at # least one of these headers) RewriteCond %{HTTP:x-wap-profile} !^$ [OR] RewriteCond %{HTTP:Profile} !^$ [OR] RewriteCond %{HTTP_USER_AGENT} "acs|alav|alca|amoi… Re: Error when using .htaccess redirect to mobile section of my website Digital Media UI / UX Design by Anu_5 … # Check if this is the noredirect query string RewriteCond %{QUERY_STRING} (^|&)noredirect=true(&|$) # Set a… if we're not already on the mobile site RewriteCond %{HTTP_HOST} !^m\. # Check to make sure we… haven't set the cookie before RewriteCond %{HTTP:Cookie} !\smredir=0(;|$) # Now … replace address - how to? Programming Web Development by dedoo …## Details Link Page Rewrite## RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule (.*)fishing…[QSA,NC] ## Pagination Rewrite RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule (.*)page… Joomla 1.5, rewrite with .htaccess Programming Web Development by Krstevski …any script trying to base64_encode crap to send via URL RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] # Block out any… Begin - Joomla! core SEF Section # RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/index.php RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw… Re: Joomla 1.5, rewrite with .htaccess Programming Web Development by bradolive …any script trying to base64_encode crap to send via URL RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] # Block out any… Begin - Joomla! core SEF Section # RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/index.php RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw… Re: Joomla 1.5, rewrite with .htaccess Programming Web Development by okahontas …any script trying to base64_encode crap to send via URL RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] # Block out any… Begin - Joomla! core SEF Section # RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/index.php RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw… jsp rewrites - SEO friendly URL's Programming Web Development by ngod23 …/launchMode/restricted/downtime.html RewriteCond %{REQUEST_URI} !^/servlets/weboamLocal/.* RewriteCond %{REQUEST_URI} !^/OA_HTML/cabo/.* RewriteCond %{REQUEST_URI} !^/OA_MEDIA/.* RewriteCond %{REQUEST_URI} !^/$ RewriteCond %{REQUEST_URI} !^/([^/])*.htm(1)? RewriteCond %{REQUEST_URI} !^/([^/])*.(gif|bmp|jpeg…