Category Archives: htaccess

domain pointing to a folder

ShareThis approach has you code the first part of the domain or subdomain name and the associated subdirectory in your .htaccess file.   For example: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !^/subdirectory/ RewriteCond %{HTTP_HOST} ^(www\.)?name\. RewriteRule ^(.*)$ subdirectory/$1 [L] Note … Continue reading

Posted in htaccess | Tagged , | Leave a comment

url rewriting guide

ShareIntroduction to mod_rewrite The Apache module mod_rewrite is a killer one, i.e. it is a really sophisticated module which provides a powerful way to do URL manipulations. With it you can do nearly all types of URL manipulations you ever … Continue reading

Posted in apache, htaccess | Tagged , , , | Leave a comment

htaccess not working

ShareOn your httpd.conf Set this: AllowOverride All same for the other one and uncomment this line LoadModule rewrite_module modules/mod_rewrite.so <Directory /> Options FollowSymLinks AllowOverride All Order deny,allow Deny from all </Directory> <Directory “C:/htdocs”> AllowOverride All </Directory>

Posted in apache, htaccess | Tagged , , | Leave a comment

mod_rewrite cheat sheet

Share mod rewrite cheat sheet – Upload a Document to Scribd

Posted in htaccess | Tagged , , , , | Leave a comment

www redirect

ShareIf you want to redirect your domain from http://domain.com to www.domain.com you must put this rule at the very top and before all other rules you have on your htaccess file. RewriteEngine On RewriteCond %{HTTP_HOST} ^mydomain\.com RewriteRule ^(.*) http://www.mydomain.com/$1 [L,R=301]

Posted in htaccess | Tagged , | Leave a comment