i'm using a directory named "onedrive/example/" In the dir Example all my php files are stored.
Now i want to redirect using htaccess like this:
When someone is trying to access http://www.my-site.com/onedrive-redirect/pagename.php htaccess needs to redirect the user to http://www.my-site.com/onedrivee/example/pagename.php
But how do i create that? I already tryed this:
Options +FollowSymLinks
RewriteEngine on
php_flag session.bug_compat_42 0
php_flag session.bug_compat_warn 0
php_value memory_limit 64M
RewriteRule ^onedrive-redirect/(.*)/ ./onedrive/example/$1.php
RewriteRule ^onedrive-redirect/(.*) ./onedrive/example/$1.php
but this example doesn't do the job for me. Can someone help me to get it working?
You can use this code in your DOCUMENT_ROOT/.htaccess
file (parent directory of onedrive
) :
RewriteEngine On
RewriteBase /
RewriteRule ^onedrive-redirect(/.*)$ /onedrive/example$1 [L,NC]