I have recently moved my wordpress site from "test.xxxxxx.com" to "xxxxxx.com" They are both identical except I just want to get rid of the "test" portion of my url on my index page and all my links. They are both on the same FTP and server. I transferred my site and have the homepage url working correctly but when I click on any of the links it still says "test" in front of the url. I have tried a couple different search and replace plugins with no luck. Is there a better way to go about this?
Wordpress has a problem that it doesn't update the permalinks easily. So, maybe you will have to change the permalinks manually in the wordpress database.
Use Better Search Replace plugin in order to fix old urls in your database.
After downloading and activating the plugin, you juste have to type old url to find and by which url to replace it, in your case you have to do it twice :
test.xxxxxx.com to xxxxxx.com
and
test.xxxxxx.com/ to xxxxxx.com/
I advice to do it twice because sometimes the plugin make difference between these two (strict string comparison I think) and wil not modifiy everything with only one command
Related
I have a folder which have a construction below.
images_folder1/
├image01.png
├image02.png
images_folder2/
├image01.png
├image02.png
I want to upload these folders and get the link to access and I hope that the link has something like a relative path or absolute path.
(ex: https://〇〇//images_folder1/image01.png)
I already tried to use Github to accomplish this goal. Actually Github enables me to get the link with a path structure like "https://github.com/User/test_repo/blob/main/images_folder1/image01.png".
but the images should not be seen to other people except for those who know the link.(Github's private repository cannot do this. I have to get the repository "public") That's why Github is not suitable.
Also, I came up with the idea to get the link by using online storage services like "Box" but the link that I can get via Box seemed to be encrypted.(I mean there are no relationship between the folder structure and the link itself.)
Are there anyone who know the best websites or applications suitable for my requirements?
It is the first time to ask questions via stack overflow and I'm Japanese, so there might be some expressions hard to understand or sentences that don't contain sufficient explanations. Please let me know.
GitHub also gives you a relative or absolute path for your image other than url like https://github.com/User/test_repo/blob/main/images_folder1/image01.png. Just make sure, the url path you have given is correct. As:
If your GitHub pages site is publised at abc.github.io then type abc.github.io/images_folder1/image01.png.
If your GitHub pages site is publised at abc.github.io/repository then type abc.github.io/repository/images_folder1/image01.png.
Note: Make sure that no "/" is used at the end of the image, or page, url. Such that abc.github.io/images_folder1/image01.png/ should not be used instead of "abc.github.io/images_folder1/image01.png" , otherwise it will throw an error.
EDIT:
Suppose your GitHub username is "abc".
And you create a repository named "tiger", and turn GitHub pages on from the setting.(If your repository is private then you will need to upgrade to a premium account to active GitHub Pages)
Then your GitHub Pages will be published at "https://abc.github.io/tiger",i.e.,
("https://your-username.github.io/repository-name") by default and the "index.html" file will work as your homepage.
And if you repository name is "tiger.github.io" instead of only tiger, then your GitHub Pages will be published at "https://tiger.github.io",i.e.,
("https://repository-name.github.io").
But of you want to connect it to a custom top-level domain then you can do it from the settings.
I have a Jekyll blog using the Minimal Mistakes theme. It's hosted through GitHub Pages, with a custom domain name. The github repo is called eg me.github.io. Currently, the blog is at something like http://www.example.com, so each post comes up like http://www.example.com/trouble-with-urls/.
I want to change it so that it's all at http://www.example.com/blog instead. I have added baseurl: "/blog" to my _config.yml file and now the posts are at the right place, http://www.example.com/blog/trouble-with-urls/. However, I now have two problems: all my image links are broken, and more importantly the links to individual posts are also broken.
Is it possible to automatically redirect posts? I looked at the jekyll-redirect-from gem, but I don't really understand it. It looks like the baseurl is automatically included in the path for the redirect_from: and I can't work out how to ignore it. The readme for that gem says, for customising, "Simply create a layout in your site's _layouts directory called redirect.html." Is there something I can do with that?
Actually I would also like to change the permalinks as well, to add dates, but I'm trying to focus on one problem at a time! Eventually the final URL of each post should be like http://www.example.com/blog/2021/02/13/trouble-with-urls/.
For the images, they are currently all hardcoded like ![url trouble](/assets/images/2021-02/ugh.png). I can fix the path by adding in "/blog", to make it ![url trouble](/blog/assets/images/2021-02/ugh.png) but I think this might be a bad way to link images anyway. I saw that there are {% %} tags for links but can't find any resources about using them for images. Is it possible?
I managed to get this working, so here's what I did in case anyone else tries similar in future.
Adding a baseurl in _config.yml didn't work. Instead, I duplicated my repo, to take advantage of Github Pages' allowance for 1 User site but many Project sites.
One repo remained as me.github.io. I renamed the copy to blog, and added a gh-pages branch. This made GitHub automatically deploy it at me.github.io/blog.
Within the blog repo, I changed the permalinks to the style I wanted. The images were fine as the relative paths hadn't changed.
Within the original me.github.io repo, I first changed the home page (by editing the Minimal Mistakes html files) to hide all posts. Then I added a link at the top of the page to their new home, at me.github.io/blog. The blog is now successfully a subsidiary of the main site.
So that old links wouldn't break, I kept all the existing post files in the me.github.io repo. I used the jekyll-redirect-from gem to add redirects into each post for the new address. This was done by manually adding a line into the Front Matter of each, saying eg redirect_to: http://www.example.com/blog/2021/02/13/trouble-with-urls/. I also deleted all the post content of these posts, so only the Front Matter was left.
All future posts will be made within the blog repo, and so they will have the correct URLs.
Hi contao developer out there,
Anybody knows why the styling of the whole admin backend's missing.
I attach a screenshot, let me know if anyone knows something.
enter image description here
Looks like you have installled your Contao into a sub directory and setup your base url incorrect.
Have a look into system/config/pathconfig.php and verify the path is the same as in your browser (i.e. return ''; for an installation in the root dir and return '/some-dir'; for an installation in an subdir).
You should also check with web-developer tools as to which URLs for the Backend CSS it tries to load. Usually this already points out what in the base url is wrong.
Last thing, you might have set up some "strange" rewrite rules in your .htaccess file which may cause these problems.
Problem solved.
The fact that, the problem comes from the server configuration.
The Php process wasn't have enough permission, so it takes me some time to realise and knowing that I need to change the apache modul version to cgi/fpm mode.
This grants the php to recreate and generate the assets including js/css in asset folder. (at least from my own observation) and it works now.
We recently moved our communities to the cloud and with that we moved all subfolders up one level.
So, previously we had:
www.mywebsite.com/abcd/otherstuff/index.htm
And now our folder structure is:
www.mywebsite.com/otherstuff/index.htm
We've stripped out the abcd from all URLS in the website itself. The problem is, there's lots of tech notes and bookmarks out there in the world that still point to the old URL and they are getting a 404 and a lot of people are not happy.
Is it possible to write a script that enables our communities to detect the presence of abcd in the URL, strip it out, parse the remainder and direct the browser to the correct address?
What language would one write this in? Would it go in the HTTACCESS file? Has anyone done anything similar before?
Thanks.
I haven't done it but you may find this information useful: http://coolestguidesontheplanet.com/redirecting-a-web-folder-directory-to-another-in-htaccess/
I've looked around a bit and can't seem to figure out how to link to a static file while using Silex. I've seen some similar questions/answers in regards to Symfony, but they involved YML routing files, which I don't use with Silex.
My Situation
I have some files in a /docs folder. Logged in users can upload new pdf files (so, I don't know ahead of time what all of the filenames will be; they're constantly changing).
My Intent
I need to be able to link to these PDF files, so that a click on a link somewhere will open www.myurl.com/docs/myfile.pdf.
The Problem
Due to the routing system in silex, it treats the url as a route (obviously) and throws a Page Not Found error.
Thanks in advance for any feedback!
You need to configure your web server in a way that it does not forward existing files to the front controller. The web servers section of the silex documentation has examples of such configurations for the most popular web servers.
As for the link itself, just link to the file directly, something along these lines:
{{ filename }}