Mod rewrite question

Hi guys!

I have mod_rewrite rules setup, which redirect users from:


However, I want to modify it so that I can redirect users from:


How can I modify my .htaccess file so that this is possible?

.htaccess file…

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteRule ^domains/(.*)/? /details.php?domain=$1 [NC,L]


Well, i’m not a mod_rewrite guru, but my response would be that you want your rule to read as
“Anything that doesnt start with details.php should be rewritten as details.php?domain=$1”

Don’t you mean redirect [noparse][/noparse] to [noparse][/noparse], since that’s the current URL that also redirects to the PHP or do you really want to redirect it to the PHP itself ?

No…my links will point to and I want it to load

Do you see?

So [noparse][/noparse] and [noparse][/noparse] should show the same page? Why? That’s duplicate content

Ahh sorry, I probably didn’t explain myself. I won’t be using [noparse][/noparse] anymore. So I will just be using [noparse][/noparse] instead.

Ah, now it makes sense! :slight_smile:

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/? /details.php?domain=$1 [NC,L]