URL Rewriting with port number and root folder in PHP

I have written URL rewrite like this

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^home index.php

RewriteRule ^process login_do.php
RewriteRule ^logout logout.php
RewriteRule ^request event-request.php
RewriteRule ^gallery event-gallery.php
RewriteRule ^press-releases/([0-9]+)$ press_releases.php?y=$1
RewriteRule ^single_pr/([0-9]+)$ single_pr.php?id=$1

and it is working perfectly on IIS server after converting this into webconfig
but when I deployed my application on XAMPP Linux it is not working and showing,
REDIRECT loop on browser.

Can anyone guide me how to add port number and folder name in the URL rewrite, because I think IIS is considering localhost/myapplicaiton as localhost/index.php so that is why it is working in IIS.
Guide me for Linux and Windows.


Source: .htaccess

Leave a Reply