Website is running on a web host where we don\'t have access to a .htaccess
file. However, I want to do URL rewriting for user friendly URLs.
e.g. Origi
Try this
www.example.com/file?q=name
to
www.example.com/name
(better than www.example.com/file/name
)
Open your .htaccess
from your project root folder and add this code
Options +FollowSymLinks
RewriteEngine On
RewriteRule \.(js|css|jpe?g|png|gif)$ - [L]
RewriteRule "^([ \w-]+)/?$" /file?q=$1 [L,QSA]
This solves your problem. See the post how to rewrite URL in .htaccess