Answer the question
In order to leave comments, you need to log in
How to generate a file with redirects?
Hello everyone, forum users.
I've been assigned a task that I can't figure out.
Given:
There is a site on MODX - an online store with about 600 products, about 300 more pages of categories, publications, etc... The site has a base that contains the uri of each page in the corresponding table (modx_site_content).
There are tables of the old site - parsed CSV.
Needed :
I need to generate a redirect file. In fact - write a script that will look for matches by pagetitle in CSV with pagetitle in modx_site_content, if it matches, fill in the redirect template from doc_url of the parsed table to uri in the modx_site_content base table.
Problem:
I have never worked with databases at all. I don’t even know how to connect to the database and how to get information from the CSV table. Tell me, what php methods should be applied, and how to do it right? Redirect through php with header 301 or is Apache able to withstand in its htaccess around a thousand redirects?
Answer the question
In order to leave comments, you need to log in
how to get information from CSV tableGo to phpMyAdmin create a table, import data from csv into it (about 10 clicks)
the Apache is capable to sustain in the htaccess around thousand redirects?How to answer the question without knowing either the hardware configuration or the settings, or the load that is currently available. Nor the interval during which these requests will be. It will definitely withstand a thousand redirects a year.
I have never worked with databases at all.Apparently with php, too, not really. So I advise you to go freelancing and find someone who will do it. Because your question sounds like this: "I was instructed to assemble a tank here, I'm really a dentist by profession, but maybe someone will give advice in a couple of lines"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question