I’m having some problems in my .htaccess file.
I would like to display the content of this URL:
http://mywebsite.com/admin/payments/invoices/view/index.php?id=123456
When I access this one:
http://mywebsite.com/admin/payments/invoices/view/123456/
Here’s my actual .htaccess
Options +FollowSymlinks
RewriteEngine On
RewriteBase /admin/payments/invoices/
RewriteRule ^/view/([0-9]+)/(index.php)?$ /view/index.php?id=$1 [L,QSA]
Do you have any idea?
Thanks!
If you do have the
viewdirectory, then the easiest thing is to put this.htaccessin that directory (i.e.{DOCUMENT_ROOT}/admin/payments/invoices/view/.htaccess):The index.php in the left side hand of the
RewriteRuleis not required (actually, I expect it not to work: theDirectoryIndexshould not yet have been injected in the URI at this stage – unless some otherRewriteRuleis in effect?), nor is the / at the end of theRewriteBase.I tested the above on Apache/2.2.21, but the module rules are the same for later versions.