Clean URLs Drupal 7 - drupal

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.

Related

How to locally link pages in worldpress

We are currently building a site on our server that will eventually take over a current site. The problem we are running into is that all of our hyperlinks will change once we transfer over to the new site. Is there a way to link pages without hard coding in the URL?
You will probably want to use mod_rewrite to rewrite your URL from the old format to the new format. You might start at http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html. If you search on mod_rewrite, you will be able to find lots of examples and tutorials to help you.

Wordpress network site URL handling

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 installation and domain naming strategy?

I have a my main site, called "mysite.com" (for arguments sake). On this site, you will find my blog and everything I do. But I am starting another site that I want to run on my domain. However:
The other site must have it's down domain name: newsite.com
If people go to mysite.com/newsite it must redirec to newsite.com
If people go to newsite.com, it must show the content of what they would see if they had gone to mysite.com/newsite in the past
So basically, I want a "page" or actually a whole section ( mysite.com/newsite/* ) to appear as newsite.com in the browser.
Why?
I want both sites to run off one drupal installation
I want both sites to look basically the same
However, keep in mind that I don't want to use a multi-drupal solution. i.e. a module that allows for more than one copy of drupal to run off 1 installation.
http://drupal.org/project/domain allows you to configure various things based on the domain, for example accessible nodes.
You can probably do the redirect with a Rewrite Rule, outside of Drupal or write a simple module that does that.
Sounds simple to do. Just install the second site using a regular multi-site installation. (Google "drupal multi-site instructions"). Then install the Path redirect module and create the external redirect to the new domain. http://drupal.org/project/path_redirect

Mask file path

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

How to map old paths to Drupal paths

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

Resources