: Rewrite URLs to add a slash I know how to rewrite URLs to redirect to a page. When the / is not at the end of www.example.com/user/myUserName the redirect works: RewriteRule /$ /user/index.php
I know how to rewrite URLs to redirect to a page.
When the / is not at the end of example.com/user/myUserName the redirect works:
RewriteRule /$ /user/index.php
When I write RewriteBase / the above rule does not work, but a 404 error.
How to add a / at the end of example.com/user/myUserName/ and still redirect to /user/index.php.
This can be written into the .htaccess or httpd.conf.
More posts by @Deb1703797
2 Comments
Sorted by latest first Latest Oldest Best
The problem is that you're referring to a directory that doesn't exist. Is the .htaccess file in the root directory of you're server?
Your english seems a bit confusing...
But from what I gather, the regular expression in your pattern isn't correct.
I belive you're trying to match everything to /user/index.php so try it this way:
RewriteRule /(.*)$ /user/index.php
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.