I have one folder inside WordPress root folder named links and there is a file called index.php inside this folder. at somewhere else in my WordPress site I do generate links such as http://mysite.com/links/index.php?link=55 (there are more than one link).
How can I have specific rewrite rule (like http://mysite.com/link/55) for above link inside my .htaccess file that don't interrupt own WordPress rule and don't throw Internal Server Error?
Here is my .htaccess content:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^link/([^/]*)$ /wordpress/links/index.php?link=$1 [L]
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress
Currently I am on localhost and my wordpress folder is in /www/wordpress. but when I click http://localhost/link/50a25386721bb
I get 404 error. what's wrong?