I'm converting a Wordpress blog to Drupal and need to map the WP paths to the new Drupal ones.
What's the best practice for doing this? There are only around a hundred pages to map. I've been experimenting with the URL Alter module, which provides an alternative to messing with custom_url_rewrite functions settings.php but keep getting 404. Waiting to hear back from the module maintainer if this is what the module is intended for. In the meantime I am wondering how others do this? Should I be using .htaccess?
Maybe this page could help you to merge your wordpress blog into drupals with WP2Drupal.
You can use Path_Redirect to catch the old URLs but still use PathAuto to give them new URLs; GlobalRedirect will make it even more transparent
Related
I have a szenario I don't know how to solve.
I have installed a MU Wordpress site.
First problem - site path
I have two sites "www.powerdoo.com" (site1) and "www.powerdoo.com/de-de" (site2).
But I want that my main site also has default path, so the result should be "www.powerdoo.com/en-us" (site1).
Inside the network "sites" settings it is not possible to change the path for the main site.
How can i solve this?
Second problem - web.config redirect
It my first problem is solved I now want the URLs Redirect like this:
www.powerdoo.com -> www.powerdoo.com/en-us
www.powerdoo.de -> www.powerdoo.com/de-de
Can anybody help me how I have to write a rule for this?
Thanks Steffen
In that case you need to map the domains to the respective wp sites and have rewritten the base url.
This plugin will help you out to achieve those redirects, is extremely easy to set up and also it will take care of the base url rewrites.
https://wordpress.org/plugins/wordpress-mu-domain-mapping/
This way your sites will work fine with both URLs (www.powerdoo.com -> www.powerdoo.com/en-us) and most probably you won't need to mess up the theme's code.
The only thing you need to be aware of is that "if it gets to happen"
that on some places of your theme the base url rewrite doesn't work it
will be most probably due to the way the original url is generated by
WP engine inside of the theme. But if you are php handy you will be
able to fix it on the theme or the child-theme with a
str_replace();.
Drupal newbie here!
So I enabled Clean URLs by checking the box for enabling clean URLs under the configuration. Ir works, as in there's no 'q=' and '?' in the URL but when I create a node the URL for it is given as example.com/node/x where x is a number.
How do I fix this?
Thanks!
As you noted, clean URLs work for you.
You are probably looking for a way to change the URL path of a node.
Drupal comes with the Path module. Enable it and you’ll be able to provide an alternative URL in the node edit form.
For further functionality: Pathauto is one of the most popular Drupal modules. It allows to automate the creation of those URLs.
I'm using the latest version of Wordpress for the public portion of my site and CakePHP for the actual web application. Since I want to keep the application consistent, I want to use Wordpress functions (for example get_header(), get_sidebar(), and get_footer()) to achieve this in my view files. Can I just use an require statement and call in the functions I need? Has anyone done this? Would there be any conflicts (e.g. functions with the same name) and is there a way to avoid it?
Additionally, I know CakePHP usually assumes path are relative to the app/ directory. Is there a way to get around this?
I recently tried something similar. You would be combining both codebases, and yes, there are name collisions. PHP5 namespaces would fix this, but they are only planned for CakePHP 3.0.
I'm not sure about including certain parts of WordPress into a CakePHP app, it would probably get quite messy and WP might fail if its being loaded in a different path to what it expects. Unless someone else has done it before you might find yourself doing a lot of work and discovering that it can't be done at all.
There are some guides to installing them side-by-side, but nothing seems to cover grabbing posts, and parts of the template from WP in Cake.
Here are the some options I would think about:
1) Having WP located in /blog and simply make sure your WP theme matches your CakePHP layout visually.
2) Build a simple blogging platform into your Cake application.
3) Build the CakePHP part of your application as a WordPress plugin.
We are looking to run one website using two CMS systems, so for all the content related stuff it would be drupal, and then for all the ecommerce related stuff, we are looking to use Magento.
Do you think this is possible? What are the general thoughts on this as an idea?
Usually we would have the ecommerce on a subfolder, like /store/productname... however, the client has specifically asked that we don't have it on a subfolder, hence asking for opinions on here.
Edit: For the sake of anyone thinking this is not programming related, I am wondering if there is something that you could achieve with the .htaccess file (rewrites etc).
I don't think this is really possible, both Drupal and Magento rewrite all incoming requests for non-existing files to index.php in the root.
I guess you could change one of the CMSs root files to index2.php and try to route requests for that CMS to the correct index file. However this means you will need to maintain a list of all paths that can be accessed by that particular CMS in the .htaccess file itself, which would be a real pain.
I am developing a site based on Drupal CMS and it has awesome image managing tools but there is a problem: While the images are being nicely resides rotated or else their paths become a bit weird for a common user.
It just so happens that users will see a lot of my images urls and I want them to look short, nice, and pretty. Since there is powerful module called Pathauto for Drupal users I just thought that changing masking files original url could be as simple as nodes.
Could it be that easy? If so, how? Maybe there is more than one way to do it? Could some non-Drupal way do the job?
You could try editing the htaccess file. It seems someone else has had that same thought... Drupal alias your file paths using htaccess