I have created an application that uses application directories so I have a frontend and backend. I want to setup friendly urls for both and I do not want to show the scriptfile.
How do I configure the system so that it would know that a request for front or products goes to index.php and a request for back goes to backend.php. There could also be scenarios where the frontend and backend have the same friendly url path, ie http://domain.com/about.
I have a config file for each application and am planning on putting the friendly urls in each applications config file so they will be separate but I don’t know how the system will know which scriptfile to use when a friendly url request comes in.
I don’t know if I need to do something in urlManager’s rules or in the .htaccess to accomplish this or if it is even possible?
.....
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
.....
After you finish the above steps, you can access your pages as…