Hello! There is a website on wordpress, a lot of records in the database, I need to perform some transformations from the database, I decided to write a script in php and stupidly call it by contacting directly via the address bar. But whatever I do, wherever I put it, (wp-content, wp-content / uploads, etc.) direct conversion is impossible. Those. A site opens with a blank page which says that the material is not found or does not exist. I suppose that the matter is in the settings of the .htaccess file, but I have no idea what to do with it. Here is the code for the .htaccess file:

<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{REQUEST_URI} !^/robots\.txt$ RewriteRule ^(.*)$ http://www .%{HTTP_HOST}/$1 [R=301,L] RewriteCond %{REQUEST_URI} ^/vechernee_plate_moskva\.htm$ [OR] RewriteCond %{REQUEST_URI} ^/vechernie_platya\.htm$ RewriteRule .* http://%{HTTP_HOST}/tcategory/vechpl [R=301,L] RewriteCond %{REQUEST_URI} ^/gallery/xzotic\.htm [OR] RewriteCond %{REQUEST_URI} ^/svadebnye_platya\.htm$ RewriteRule .* http://%{HTTP_HOST}/ [R=301,L] RewriteCond %{REQUEST_URI} ^/korotkie_svadebnye_platya\.htm$ RewriteRule .* http://%{HTTP_HOST}/tcategory/korotkie [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> #<FilesMatch "\.(gif|jpg|jpeg|png)$"> # RewriteEngine On # RewriteCond %{REQUEST_FILENAME} -f # RewriteRule ^(.*)$ /watermark/watermark.php [T=application/x-httpd-php,L,QSA] #</FilesMatch> 

What should be corrected in it so that a direct access to the files in the root of the site becomes possible. Thank you in advance!

  • Do you have the correct link to the file? - atnartur

1 answer 1

Well, if you need to run the script only once, comment out (#) all the entries in .htaccess and run your script, then uncomment.

  • Not a ride. = (maybe some other reason is there? Maybe not dig in the direction of .htaccess? - maler1988
  • writes here that victoriya-salon.ru/up.php - maler1988
  • Understood. There was chaos in the FTP, I stupidly put the script in the wrong folder. Thanks for the help! - maler1988