Friendly and pages regular expression
-
Hi, I am trying to fix this with a reg expression but I dont know how.
Here is the example:
I would like to have my link like this:
mysite.com/noticias/123/here-comes-the-title-page-2
I have a mod_rewrite rule with this:
RewriteRule ^/noticias/([a-zA-Z0-9]+)/([a-zA-Z0-9-]+)-(pagina)-([0-9]+)$ /myphp.php?&id=$1&ipag=$4 [L,NC]
It doesnt work. I think that the problem resides here ([a-zA-Z0-9-]+) because the title is split with "-" and the rule doenst know when the title finish.
Now, if I have a rule like this it works:
mysite.com/noticias/123/here-comes-the-title_page-2
RewriteRule ^/noticias/([a-zA-Z0-9]+)/([a-zA-Z0-9-]+)_(pagina)-([0-9]+)$ /myphp.php?&id=$1&ipag=$4 [L,NC]
How can I fix this to have a "-pagina" instead of "_pagina"
Thanks
-
May I know the platform of website ? If it is wordpress, just one plugin is needed in that case.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Does removing pages, so that they return 404, also remove any impact of spam links pointing to that page?
A site with numerous spam links pointing to an old forum. The forum is now removed so do I need any further action? thanks,
Link Building | | ElaineDesignLobby0 -
I recently had someone say a resource page is a bad idea. What do you think?
I have a resource page on my website: www.joeborders.com an admin on the google webmaster forum said I should get rid of it. That google might look at it as spammy and gaming the system. Either that or greatly expand on it and make it more complete. I haven't updated it in a while and its far from complete. What do you think? Boot it or grow it?
Link Building | | joebordersmft1 -
On-Page / Site Optimization+Link Building -check help!
HI all, have also Question One, i don't understand how is this website : competitor website http://hack-clash-royale. com/ beter them my website i analze i have more more backlink and my website is strong have good seo but not on first position, you can tell me what is problem, my website is 4-5# and competitor 1-2# .. thanks
Link Building | | Fahad5Saleem0 -
Are new pages treated similar to new domains with respect to ranking?
Hello...I'm hoping to get some advice or guidance regarding the following. My website has gone from a 30 page site about loans, to a 500 page site covering a much wider range of products such as mortgages and other more specific loan related pages. All the new pages were made live at the same time, and I've been through GWT tools to add pages with in the Google fetch and most have been indexed fine. My question is, how should I expect Google to treat all of these new pages? The site has changed massively and many of the new pages are at pages 3-4 for their key terms. Will Google treat these new pages in the same way it may a new domain, e.g. it could be potenitally a couple of months before the pages start to rank better? I appreciate that the terms are very competitive. Thanks!
Link Building | | Dave_B1 -
Keyword drop with its own appropriate landing page
I have a question to ask. I have these two generic keywords - e.g. shoe and shoes. These two keywords have its own landing pages - www.example.com/shoe.aspx and www.example.com/shoes.aspx Now here is my dilemma. Every time I do link building on these keywords using its own landing pages (www.example.com/shoe.aspx and www.example.com/shoes.aspx), the landing page which is "www.example.com/services.aspx" is the one that ranks on the SERPs while the appropriate landing pages (www.example.com/shoe.aspx and www.example.com/shoes.aspx) go down in the results. So what I did was I started using the services page ( www.example.com/services.aspx) for both keywords - shoe and shoes. Now what happened then and now was that, the shoe and shoes appropriate pages (www.example.com/shoe.aspx and www.example.com/shoes.aspx) go up in the SERPs while the services page (www.example.com/services.aspx) go down. I do not know what to do. Pls help
Link Building | | matti_wilson0 -
Subdomain or no subdomain ? About location of a special page on the site
I have a blog on interior decoration and I have made a Wordpress Plugin which is not at all related to the niche of my blog...I have created this plugin in the hope that I might get backlinks due to this...but am not sure whether I should keep the plugin documentation page on some page of the blog itself like www.example.com/blog/plugin-page/ or on some subdomain like plugin-page.example.com
Link Building | | ksbnok0 -
My friend seems to have been hit my Negative SEO
A friend of mine has asked me to help him out as he seems to have been hit by Negative SEO. His ranks have recently dropped and that seems to coincide with the following email he got. I have changed the web address Small gif for you and you f%$£@£ seo spamers http://www.website.com/website keyword : website now your site go down in google you f$%$£@g bastard !!! urls list ofer 5000 They have then listed him in 5000 blog comments which has seemed to cause his ranks to drop off the radar. I am going to help him out free of charge as he is a good mate, I am seeing conflicting stories on here some saying Negative SEO is a myth, others saying its very real. Anybody got any tips on how to resolve this quickly? Thanks James
Link Building | | tempowebdesign0 -
Effects of link bait page
Hi Mozzers! I'm thinking about putting a page with some interesting comedy content on my site as link bait and had a few questions on how i should go about it. 1. Should I link to this page from my home page or would it be better to build outside links to it and then funnel all the page rank to the pages on my site that i want ranking higher? I've been told that page rank is a tiny factor in ranking in the serps so is it worth doing if the only reason i'm building it is to funnel page rank to my important pages? The link bait page content will be on the same subject as my entire site so it will definitely help google associate my site with my product from the incoming links. 2. if a web page on my site receives links does it help other pages on my site to rank higher or just the page with the incoming links? One time i had a flurry of links pop up to my home page and it seemed like all my pages started ranking higher, but it might just have been coincidence? Any thoughts? 3. What's a good way to get my page seen by the masses to draw links? I thought about buying some stumbles on Stumbleupon to get it seen quickly but are there more or better ways to do this? Thanks in advance everyone! Ron
Link Building | | Ron100