.htaccess Syntax

software development


I’m moving http://www.jaybrewer.net/fastfoodfever/ to http://www.fastfoodfever.com/

Will this work?

RewriteEngine On
RewriteRule ^/fastfoodfever/(.*)$ http://www.fastfoodfever/$1 [R]

Or put this in .htaccess for /fastfoodfever

RewriteEngine On
RewriteRule ^/(.*)$ http://www.fastfoodfever/$1 [R]


Removing the leading slash in the pattern:

RewriteRule ^fastfoodfever/(.*)$ http://www.fastfoodfever/$1 [R]Or if you prefer to put the .htaccess file in the fastfoodfever directory, it should be:

:cool: Perl / MySQL / HTML+CSS


The easiest thing to do would be to put the following in the .htaccess in the root directory of your old site:

Redirect /fastfoodfever http://www.fastfoodfever.com Redirects are more efficient than mod_rewrite, so always use them if you just need a simple redirection.

If you want useful replies, ask smart questions.


Another way you can redirect it to use meta tags.
Create a new html file with text in it saying they are going to be redirected to the new website.

It will look like this:

fastfoodfever- New Location

We have moved to a new location. This page will be redirected to www.fastfoodfever.com Click link if you do not get redirected in 3 seconds.