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
-
Will these pages harm the SEO of my blog?
Hi there, If I put download pages and thank you pages on my blog, will it harm the SEO rankings? As these pages will be pretty thin and will have no links to them internally for obvious reasons, it has me concerned about the effect it could have on my blog. I want to build my blog up to drive traffic, so it's not just a case of throwing the pages up. What is the best solution? No index the pages -- will that be enough? Warm regards Colin
Link Building | | username670 -
Should my backlinks point to my home page or to internal article pages?
Hi, I run a fitness blog and I get the majority of my backlinks through guest posts that I write on high quality sites. Sometimes they allow me to put a backlink within the article, and I'll link it to a relevant article of mine. However, in the "author bio" section my backlink anchor text is usually just my brand name. I was wondering if this backlink should point towards my home page or is it more beneficial to point it towards an important article of mine? Thanks
Link Building | | jeremyethier0 -
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 -
Reject a link from a not found page
Hello, I am writing because I have a question about link building. My page has got a link from this URL http://fundacionbanesto.com/ (PageRank 6) but I know that it no longer exists. Do you think it is negative for my site? Should I reject it? Thanks in advance.
Link Building | | ofuente0 -
Is it worth 301 redirecting an old backlink from a 404 to a landing page?
I was reviewing the 404 report in webmaster tools, when I found a 404 back link from a 10 year old forum topic on a very high DA site. It seems the poster did a direct hotlink to a pdf that was on our site a very long time ago, but is now gone so you get a standard "can not be found" page on our site. Is it now worth redirecting the url to an appropriate landing page, considering the age of the post/ link and the sites DA, or is it not worth it because of the age of the link, its a forum, and we are still getting some juice from it anyway despite it being a 404, and won't get much more out of it. Just want to know it good practice if I find many such links (very old links to now 404 pages) Thanks
Link Building | | PaddyDisplays0 -
Squidoo and hub pages links spammy?
I was wondering if links from sites like studio, hub pages and tumblr are worth it in 2013 post panda/penguin? It seems spammy to me but some people appear to still use them? any thoughts?
Link Building | | SamCUK0 -
OSE returns strange domains and pages
Hi guys, I've just started using Seomoz and so far it is awesome! However, there is one thing that I can't figure out. When using Open Site Explorer to analyze inbounds links my competitors got, I've found that one of them has links coming from strange domains like fema.gov. It is unlikely that they have a link coming from such a site, but all these sites have a download as the top linking pages. Probably the top 20 linking root domains are like this. So my question is; is this a bug in OSE, how do I find out if they really have a link coming from this site?
Link Building | | HDPHNS0 -
What % Page Metrics & Social, What % Links?
It seems that a lot of the focus of SEOs, especially whitehat SEOs like SEOMoz and Distilled has shifted a lot more towards improving page metrics (bounce, return rate, etc) and social metrics. I'm curious - And of course, I'm just asking for guesses - But what percent of ranking do you think is page metrics, social metrics and other non-link based metrics and what percent do you think are link based metrics?
Link Building | | DerekP0