Hello there,
I'm trying to use some URL rewriting through an htaccess file, but I have troubles doing so.
For testing purpose, I create a .txt file with the following code:
And then I upload it in a 'test' directory (alongside an index.php file), then rename it .htaccess
This code should redirect anything looking like
http://myaccount.x10.mx/test/ANYTHING
to
http://myaccount.x10.mx/test/index.php?q=ANYTHING.
My index.php file exists, and works when directly accessed.
But the redirection doesn't work, and I get 404 pages.
I tried with no "RewriteBase /", "RewriteBase /test/", "RewriteBase /test", "RewriteBase /home/myaccount/public_html/test/", because I saw RewriteBase was maybe the root of the problem.
But nothing works.
Any idea?
I'm trying to use some URL rewriting through an htaccess file, but I have troubles doing so.
For testing purpose, I create a .txt file with the following code:
RewriteEngine on
Options -MultiViews +FollowSymlinks -Indexes
RewriteBase /
RewriteRule .* index.php [L,QSA]
And then I upload it in a 'test' directory (alongside an index.php file), then rename it .htaccess
This code should redirect anything looking like
http://myaccount.x10.mx/test/ANYTHING
to
http://myaccount.x10.mx/test/index.php?q=ANYTHING.
My index.php file exists, and works when directly accessed.
But the redirection doesn't work, and I get 404 pages.
I tried with no "RewriteBase /", "RewriteBase /test/", "RewriteBase /test", "RewriteBase /home/myaccount/public_html/test/", because I saw RewriteBase was maybe the root of the problem.
But nothing works.
Any idea?
Last edited: