php - httaccess rewrite multiple directories to one file -


i'm starting feel bit stupid now. first time i'm working without established php framework ci or laravel , have issue htaccess redirecting folder path structure index file in folder.

here's example: have 4 urls follows:

http://www.example.com <-- wurstpress site - client's choice, not mine) http://www.example.com/user <-- "user" actual folder index.php file in http://www.example.com/user/settings/private http://www.example.com/user/settings/public 

the issue can wp site on root , can /user url no problem. 2 settings urls want rewritten /user/index.php file full url path included, ci or laravel can segments of url, this: http://www.example.com/user/index.php/settings/private not want redirect user there, need index.php script @ request uri , see /user/index.php/settings/private path.

i've been struggling long , know it's stupid simple i'm not seeing, appreciate everyone's here.

here's .htaccess file:

<ifmodule mod_rewrite.c> options +followsymlinks -indexes options -multiviews rewriteengine on rewritebase /  rewriterule ^/user/(.*) /user/index.php$1 [l]  rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> 

please remember can't dork client's wp site can't change base path , need leave wp stuff there too. added code above that. i've tried hundred or more various combinations of 1 line user path.

in user/index.php file i'm @ moment trying output request uri i'm getting wp page not found page instead.

rewriterule ^user/(.*)$ user/index.php$1 [l] 

also may want instead:

rewriterule ^user/(.*)$ user/index.php?request=$1 [l] 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -