WestCoast_BC
asked on
Help with .htaccess
What do I need in my .htaccess file so if a user enters the URL:
http://www.mysite.com/thisgroup/
And the directory/file thisgroup does not exist I was hoping the user would be redirected to:
http://www.mysite.com/notfound.cfm?group=thisgroup
thank you for your help
http://www.mysite.com/thisgroup/
And the directory/file thisgroup does not exist I was hoping the user would be redirected to:
http://www.mysite.com/notfound.cfm?group=thisgroup
thank you for your help
ASKER
Thank for your comment.
thisgroup needs to be a variable. I need to handle :
http://www.mysite.com/thisgroup/
http://www.mysite.com/testgroup
http://www.mysite.com/anothergroup
etc....
thisgroup needs to be a variable. I need to handle :
http://www.mysite.com/thisgroup/
http://www.mysite.com/testgroup
http://www.mysite.com/anothergroup
etc....
Do you want it handled as a 404 not found or a 301 re-direct? It makes a difference in how the Search engines will treat it.
Cd&
Cd&
ASKER
I believe as a 404 not found.
ASKER
I have sort of solved my problem by changing the rule for my users. If someone uses:
www.mysite.com/group/thisgroup
I have setup a redirect rule so the above becomes www.mysite.com/group/group=thisgroup
My .htaccess has the following:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^group/([A-Za-z0-9-]+)/?$ /group/?group=$1 [NC,L]
I am hoping that there is an answer to my original question.
Thank you all for your help.
www.mysite.com/group/thisgroup
I have setup a redirect rule so the above becomes www.mysite.com/group/group=thisgroup
My .htaccess has the following:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^group/([A-Za-z0-9-]+)/?$ /group/?group=$1 [NC,L]
I am hoping that there is an answer to my original question.
Thank you all for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ErrorDocument 404 http://www.mysite.com/notfound.cfm?group=thisgroup
Cd&