Mobile app version of vmapp.org
Login or Join
Pierce454

: Htaccess 301 redirect dynamic URL 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/

@Pierce454

Posted in: #301Redirect #Htaccess

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=&nEntryID=&nCategoryID=&sDirectory= [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=&nEntryID=&nCategoryID=&sDirectory= [NC,L]


I'm unsure of the correct syntax to go about making these redirect correctly.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Pierce454

1 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

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+)/?$ www.example.com/directories/index.cfm?sFuseAction=XXX.YYYY.ZZZZ&nDirectoryID=&nEntryID=&nCategoryID=&sDirectory= [NC,L]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme