httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Nunnelley <ja...@jasonn.com>
Subject Re: [users@httpd] htaccess format howto question
Date Fri, 14 May 2010 03:05:49 GMT
On 5/13/10 8:08 PM, David Banning wrote:
> I am wondering how I might do a .htaccess redirect if I want to redirect
>
> domain.com/index.php?id=606
>
> to domain.com

Same domain (as I assume because domain.com and domain.com are the same).

First, you'll need to set up the rewrite basics.

RewriteEngine On
RewriteBase /

Then, the specific rule.

RewriteRule ^$ http://www.domain.com [R,L]

This is what you'd do if it's a different domain from any and all URLs 
at that website. Just for example.

RewriteRule ^/index.php?id=606 / [R,L]

Is going to look for index.php on that domain.

This may redirect the URL to where you're trying to get.

There's other folks here that do better with the regular expressions and 
.htaccess stuff than me. Maybe this will get the party started.

-- 

Jason A. Nunnelley
+1 2562971652

http://www.google.com/profiles/imjasonn

[Member Tekany, LLC]


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message