Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

Re: Htaccess file for redirect?

Skip to first unread message

Ivan Shmakov

Sep 21, 2012, 12:17:30 AM9/21/12
>>>>> Andrew S <andr...@gmal.cmo> writes:

[Cross-posting to news:comp.infosystems.www.servers.misc.]


> Supposedly I have to edit a '.htaccess' file, but I don't know where
> it is located on the server. Where should it be? In the default
> public_html or www folder or in one of the server folders?

The directory the site files are located in.

> So I need to redirect 5 URLs. How do I do that? How about this:

> (with htaccess on first server)

> #With mod_rewrite
> RewriteEngine on
> RewriteRule ^/subdir/(.*)$1 [R,L]

> Is that last bit correct? Is there anything else I need, like to do
> I need to close that statement?

As stated, this problem could be solved by a RedirectMatch [1]
directive, like:

## with mod_alias
RedirectMatch permanent ^/example/(.*)$1


FSF associate member #7257
0 new messages