mod_rewrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have an Apache web server and port 80 of this apache server is mapped through NAT to a public ip so that anybody can access it from outside world. The URL becomes of the form of http://1.2.3.4:9090/. 

My application generates a URL of the form of "http://1.2.3.4:9090/index.php/controller/view"; I want to remove index.php from the URL so have written an .htacess to remove that. The rule works fine for the URL which is not having a port with it. But I want it to work for an URL which may have port with it.


.htaccess contents.

RewriteEngine on 
RewriteCond $1 !^(index\.php|img|css|js|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]


Regards,
-Zaid
 


      

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux