1

I have strange problem with .htaccess file. The file is placed inside directory www.mydomain.com/t/ and looks like that:

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^([^/\.]+).html$ ../index.php [R=301]

I would like to redirect all .html files to my main page www.mydomain.com

Redirection works but I am redirected to www.mydomain.com/server/file/path/t/index.php not to www.mydomain.com (or www.mydomain.com/index.php)

Where did I make a mistake?

Thank you in advance for help.

1 Answer 1

1

Add this rule

RewriteRule ^(.*)$ /index.php?$1 [L]
Sign up to request clarification or add additional context in comments.

1 Comment

Almost :) RewriteRule ^(.*)$ /index.php [R=301] works as I need. Thanks!

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.