If your server is configured correctly, a request to a PHP file is forwarded to the PHP interpreter. It does not play a role if it is accessed directly, via a link or by clicking on it in a directory listing.
I visited both of your URLs. URL 2 shows an error message – an PHP error message. This file has definitely been processed by the PHP interpreter:
Fatal error: Call to undefined function add_action() in /home/nextgenl/public_html/wp-content/plugins/wp-import-txt/wp-import-txt.php on line 24
The first URL redirects to the main script, with the called file as parameter. It seems to be a Rewrite Configuration here. And there you are right, it should take place in your .htaccess.
For my wordpress installation, I use this .htaccess for URL rewriting:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Related Posts:
- How to create custom 401, 403 and 500 error pages?
- PHP – redirect https to http and www to non-www
- Bypass .htaccess when using download_url
- How can I run a .php file located in my site’s root folder?
- Fix 403 error on WordPress multisite network using subdomains
- How to redirect all 404 in a WordPress subdirectory to the index.php of subdirectory?
- How to run multiple websites from single WordPress setup
- Using PHP in a Stylesheet (possibly a “.htaccess” problem?)
- How to override .htaccess with new rules without ftp or edit it manual
- WordPress-site can be reached on x.x.x.x/index.php – but not directly on the IP without index.php
- Change the actual (or viewable) WordPress directory structure
- Add htaccess rules with insert_with_markers at beginning of htaccess
- Cannot get media type from ‘x-mapp-php5’
- How to rewrite URL with PHP variables with htaccess to a normal looking URL?
- How to change home or site url using action hooks or filter?
- Apache Fallback instead of add_rewrite_rule
- 3 blogs same installation, without WP MU
- Two Different Links for Same Product – WooCommerce [closed]
- Was told to change the .htacess file form .html to .php so this would work properly
- How to change redirection route to a php page for making it only accessible by logged-in members?
- how to combine wordpress htaccess on my root domain + php on subfolder
- subdirectory index.php is not working
- custom url rewrite for wordpress
- Loading index.php contents which located outside blog folder for post single page
- WP & Server Speed [Teacher Question]
- WordPress add_rewrite_rules for custom URLs ending in .html
- Troll the hackers by redirecting them
- Seo Friendly Filter URLs
- How to allow download url redirection only if user logged in WordPress site?
- How to disable all logins except Network login in WordPress Multi site?
- Removing files programmatically
- Is it possible to restrict files from your wordpress uploads (not logged-in users or guest)?
- Simple seo-friendly custom $_GET url rewrite with htaccess
- How to make Subdomain work for product_tag?
- How to serve WordPress folder over subdomain?
- Pages from admin dasboard missing after site migration
- Rewrite rule not working, but only when parameter is text
- Internal Server Errors – Moving working multi-site install to my localhost
- Deny php execution in /wp-includes – using .htaccess in /wp-includes VS root folder
- How come there is no error if I upgrade WordPress core after locking .htaccess permissions to 644?
- How to block access to a folder inside of wp-content for non logged in users?
- WordPress Redirect / Add_Rewrite_Rule – Non Index.php Page
- How to change query string with pretty URL in WordPress using .htaccess file
- Upload images from one server to an other in wordpress
- Problem with ajax request and directory structure after site migration
- How can I add “.html” to the end of a single URL on a WordPress website?
- Resource 404 error on multisite subdirectory install
- redirect 301 with special character like WIX site “#!”
- 301 redirect from webpage to wordpress page in the same root
- Rewrite /keyword1+keyword2.html to search page | .htaccess
- Redirect homepage /page/1/ to /blog/page/1/
- Enabling XSendFile causes 404 for images on WordPress Multisite / Network
- 3 domains, 1 wordpress install, redirecting and changing domains on live site
- How to use multiple 404 Error Pages in WordPress
- Increase Upload Size with htaccess | MAMP
- wp-login – unable to redirect user to a custom login url
- NGINX rewrite rules for WordPress Subdirectory Multisite to support deep URL
- Error Warning: Declaration of description_walker::start_el after PHP upgrade [duplicate]
- WordPress Warning: preg_replace(): JIT compilation failed: no more memory
- WSOD but WP_DEBUG not giving any errors
- Append code into wp-config.php
- How to turn off redirection from ‘domain.com/login’ to ‘domain.com/wp-login.php’
- wp_enqueue_style with style.php and WordPress functions
- How to get bool with `get_option()` when already registered setting with type `boolean`
- PHP code inside shortcodes
- PHP help get_template_directory + PHP include
- Reload part of checkout on changed shipping method
- Input data from email form not going to JSON file
- How to remove woocommerce_breadcrumb() from do_action( ‘woocommerce_before_main_content’ ); [closed]
- Hide a div when tags doesnt exist [duplicate]
- What does -> mean in WordPress?
- First Byte Time (back-end processing)
- How to update and save user metadata on page visits?
- Generate CSV file and add data as a new wordpress custom post
- Add URL parameter to all internal links using a specific theme
- Call featured image url
- select wordpress custom post type
- WordPress 6.0 class-wp-widget.php fatal errors in PHP 8.1.6
- Unserialize Custom Field & Save as Multiple Rows in WordPress Database
- Add a product category to a specific product via a button
- Creating a checklist with ACF and I cannot figure out how to add all iterations to an array that I’m creating
- Add Product Permalink in woocommerce admin order page
- Proper use of Output Buffer for a whole php clas
- How do I make comment-reply-button with that takes to comment reply form on click
- Allow user to choose header style
- Require advice handling a URL redirect from a Third Party. URL Params need to populate and then forward to payment
- ERR_TOO_MANY_REDIRECTS / To Force SSL Logins and SSL Admin Access
- Not able to add new item in wordpress home page
- How to apply filter
- How to find the function which is outputting Array
- How can I include a file related to blog URL? Nothing seems to work
- How Can I Center the Logo in the Navigation Menu? [closed]
- WXR XML import is stripping php tags that I need to keep
- How to remove parent section in an attachment URL in wordpress?
- I can’t log into my website , it says “Error: Cookies are blocked due to unexpected output”
- Styling best practices for single pages/templates
- Link on post title only if post have content
- How to create a form that display license key (and email it to user) after the user enter their email and 10 digit code?
- not working visual tab when use wp_editor function in wordpress
- Read data from external source. XML vs REST API