My Apache 2.2 is running on port "8080" I want to call my site url http://www.example.in:8080/abc/xyz.html/index.php
(xyz.html is a folder)
as ....
http://www.example.in:8080/abc/xyz.html
Can any one help me with the .htaccess for this..
My Apache 2.2 is running on port "8080" I want to call my site url http://www.example.in:8080/abc/xyz.html/index.php
(xyz.html is a folder)
as ....
http://www.example.in:8080/abc/xyz.html
Can any one help me with the .htaccess for this..
The rule will depend on exactly how you want it to behave.
RewriteEngine On
RewriteRule ^(.*).html $1.php
might get you close. Then create the file /wwwroot/abc/xyz.php or what ever instead of /wwwroot/abc/xyz.html/index.php
Ultimately you're searching (googling) for a way to rewrite html files to php that fits your use case.
Here's you purpose:
RewriteEngine On
RewriteRule ^(.*).html $1.html/index.php
But I guess you can do alternatives way that will not cost you making all those directories... Or maybe you're right that's the right and the only way to do it (For your purpose).
Update
You can't do this action because the browser will keep redirecting... On Apache by default it's redirect /dir to /dir/ if it is available, But I guess you can disable that from the config file (It is possible on nGinx at least) But that will force you and your visitors to put the "/" after every URL in case of directory. Our .htaccess will redirect it as a rewrite again and will never get the right path... So instead of that you can use a .htm page by:
RewriteEngine On
RewriteRule ^(.*).htm $1.html/index.php
Or (mostly) any other form you choose will work fine.