Htaccess 301 redirect dynamic URL
Htaccess 301 redirect dynamic URL -
Solution :
Additionally, if you would like to do some further testing, give the htaccess tester tool a try. It allows you to specify a certain URL as well as the rules you would like to include and then shows which rules were tested, which ones met the criteria, and which ones were executed.
.htaccess files are extremely useful in many cases for users who either do not have root permissions or for users who simply aren't comfortable in making changes in their web server's configuration file. Trying to debug .htaccess not working isn't always the easiest thing to do, however, hopefully by checking the discuss below mentioned about htaccess, 301-redirect, , , .htaccess common problems as well as the troubleshooting tips, you'll have a better grasp on what you may have to modify to get your .htaccess file running smoothly.Problem :I don't know a whole lot about .htaccess rules so forgive and help me ask the correct question.
Currently I have a .htaccess rule like:
RewriteRule ^surveys/(S+)/directory/(d+)/(d+)/entry/(d+)/?$ directories/index.cfm?sFuseAction=XXX.YYYY.ZZZZ&nDirectoryID=$2&nEntryID=$4&nCategoryID=$3&sDirectory=$1 [NC,L]
which I want to do a 301 redirect to:
RewriteRule ^(S+)/directory/(d+)/(d+)/entry/(d+)/?$ directories/index.cfm?sFuseAction=XXX.YYYY.ZZZZ&nDirectoryID=$2&nEntryID=$4&nCategoryID=$3&sDirectory=$1 [NC,L]
I'm unsure of the correct syntax to go about making these redirect correctly.
If you want to do a 301 redirect you will have to use the full URI path including the FQDN and protocol. Like so:
RewriteRule ^(S+)/directory/(d+)/(d+)/entry/(d+)/?$ http://www.example.com/directories/index.cfm?sFuseAction=XXX.YYYY.ZZZZ&nDirectoryID=$2&nEntryID=$4&nCategoryID=$3&sDirectory=$1 [NC,L]
Comments
Post a Comment