Tags » RewriteRule ^(.*)$

Save RewriteCond's backreferences to use in RewriteRule

Using Apache’s mod rewrite, it’s possible to redirect URL and stuff. One cool thing is to use backreferences and use them as environment variables. For example when you have several RewriteRule sharing some common part(s) but are different … the bad example under will, I hope, be clearer. 197 more words

Apache 2

HTACCESS Rewrite for alternate Development Favicon

Htaccess Rewrites can be super easy and super helpful.

Alternate Favicons

For developers with a production AND a development environment, it can be useful to be able to quickly differentiate which site you are currently working on just by glancing at the favicion. 54 more words


Easy htaccess tricks

.htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration. They are placed inside the web tree, and are able to override a subset of the server’s global configuration for the directory that they are in, and all sub-directories. 526 more words

Online Marketing

Changing the document root in .htaccess

If you need to change the document root for a site to a subfolder but wish to access it with the domain name itself, you need to add the below lines in the .htaccess file under /home/username/publich_html/, where ‘username’ is the actual username of the account. 105 more words


How to redirect index.html to the root / ?

Hi friends, Today I am going to tell you how to redirect index.html to the root. Try this code in your “.htaccess” file.

RewriteEngine on…
40 more words

Web Development

htaccess rewrite rules

Options +FollowSymLinks
RewriteEngine on

RewriteRule ^blogs /rewrite/single.php?archive=$1
RewriteRule ^blogs/ /rewrite/single.php?archive=$1

RewriteRule ^blog/() /rewrite/index.php?archive=$1
RewriteRule ^blog/()/ /rewrite/index.php?archive=$1

RewriteRule ^news/()$ http://domainname/rewrite/other.php?archive=$1
RewriteRule ^news/()/$ http://domainname/rewrite/other.php?archive=$1

RewriteRule ^packages/()$ http://domainname/rewrite/other.php?archive=$1… 51 more words


Redirecting Links from Uppercase to Lowercase with .htaccess

Want to redirect all links with any uppercase characters to lowercase using pure mod_rewrite within an .htaccess file? Sure why not! OR how to use RewriteMap and mod_speling for those with access to… 252 more words