0

I need to redirect a page like this (values could change in query string)

http://www.domain.com/list.php?id=bla&variable2=product1-product2-product3

Redirect to

http://www.domain.com/list.html?id=bla&variable2=product1-product2-product3

All i need is it to change to .html but everything else should remain the same on the bespoke links.

Any help out there?

2 Answers 2

1

Is it a bad idea to do the redirection in list.php file instead of using an .htaccess file?

How about something like:

header('Location: http://www.domain.com/list.html?'+$querystring);

in list.php?

Sign up to request clarification or add additional context in comments.

1 Comment

But the trouble is i need to get the page to display outside all the framework rules and redirect...thank you for the suggestion.
0

Put this in you htaccess, it should be enough.

RewriteRule ^([^.]+).html$ /$1.php [QSA,L]

(And by the way, it's useless to do this...)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.