Drupal 7 - rewrite all urls for a specifik page - drupal

I have a page (shop) in my drupal 7 site. On this page is a php script requesting a webservice.
The response depends on the URL, eg. /shop/pid-1234/pink-shoes.html will show a product with id 1234.
I therefore need Drupal to load the /shop page no matter what the URL after shop/ looks like. How do I
achive this? I have tried using wildcards in the URL alias module ($,%) but that didn't work. I have also
looked at pathauto and redirect, but didn't seem like they could help.
Any suggestions?

You probably need an Apache mod_rewrite rule. You can add something to your .htaccess file if you're using one.

Related

How do I create a redirect from one page url to another in drupal 8

Issue:
I have 2 pages in a Drupal 8 website, let's call them "/page/1" and "/page/2".
I need to force a redirect on "/page/1" so it goes to "/page/2".
How can I do this through the interface?
What I've tried:.
I have tried using the standard redirect feature:
Configuration > Search and metadata > Redirect.
But when I go to the URL it doesn't redirect.
There are two ways to do this:
1) using the web server like Apache /nginx.
If you want go this route , search how do this via vhost of your specific web server&site
Redirect permanent /oldlocation http://www.newdomain.com/newlocation
2) or install and use the popular redirect module from Drupal.org/project/redirect
And configure the urls you want redirect
You can try Rules Module. It works for me.

Redirect 301 wp url based on year/month/day to post-name.html

I recently changed the permalink structure from
https://www.domainName.ro/2018/04/10/post-name.html
to
https://www.domainName.ro/post-name.html,
using:
"RedirectMatch rule 301 ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/([^/]+).html$ https://www.domainName.ro/$4.html" and works.
Now I want to redirect, within the same site (old URL), the URLs from
https://www.domainName.ro/2018/04/10/post-name/
to
https://www.domainName.ro/post-name.html
I tried different rules and did not work.
The two rules must work at the same time on the site
Can you help me?
Thank you very much!
You can manually change the url using wordpress plugin called redirection after install the plugin you can simply add url which you need to redirect from old to new just simple go to tools and there you find redirection click on that and you will find 2 box in 1box you need to enter old url which you need to redirect and 2box you need to enter new url where you need to redirect and click on save and you are done redirecting
Hope this will work for you

How to rewrite wordpress category url

A have a wordpress theme, which has a built-in services module. All items in that can be found at domain.com/services/item. I rewrote a php file so links to these service items look like domain.com/something-else/item, but they point to the 404 page.
I would like to modify my site's .htaccess file to display the original domain.com/services/item content while users see domain.com/something-else/item.
I would like to use the url (something-else) instead the other(services) one, while keeping content the same.
Ha can I achieve this using .htaccess?
Just use the buit-in Rewrite API of wordpress :
http://codex.wordpress.org/Rewrite_API
Example : http://www.hongkiat.com/blog/wordpress-url-rewrite/

How to Remove redirection on magento site?

There is a problem on my client site.Due to some of the redirections set up for magento.. I am not able to access the wordpress pages.. Whenever I try to access a wordpress page, I am redirected to a magento 404 not found page.... so please let me know how to remove redirection on my magento site??
Your question is ambiguous. Is it the rewriting in .htaccess (or somewhere else) doing the redirect, or do they have redirects in the core_url_rewrite table that conflicts?
I would guess the former. You need to create an alias or location for your Wordpress area that are distinctly different from your Magento area. Often this is accomplished through a separate subdomain, like http://blog.example.com/ or through a suffix like http://www.example.com/blog/.

Changing WordPress URL structure - Redirects

I'm changing my URL structure from domain.com/postname to domain.com/type/postname
What's the best way to redirect? I tried using the Redirection plugin, but it seems that I need to redirect each URL manually. Is there any way to redirect all the posts at once?
Go to the wp-admin's dashboard using domain.com/wp-admin. Then look for the Settings-->Permalinks option. From this page you can change the URL settings for all of your posts.
Here are some instructions on how to redirect your sites url.
Changing the site url
Back up your site first if you still can? When I changed to pretty permalinks I had to include a forward slash to custom field images.
from: wp-content/uploads/2012/08/tulip-813-01.jpg
to: /wp-content/uploads/2012/08/tulip-813-01.jpg

Resources