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
-
Links to "boring" pages
Hello Mozzers, EDIT: Is internal linking enough? This question is my head for a long time. Let's say I have a webdesign company and a website (really?). I have a blog and write quality content on a weekly basis. The content is great and people love it, they share it on social networks and other webmasters link to these articles. Now I have one optimized page, that brings me the business. Lets say: mywebsite.com/webdesign-service On this page I only have boring stuff like saying what I am offering and testimonials and stuff. So basically a page no one shares and no one links to. But it's important to rank with the keywords targeted on this site. How do I get to rank this page? A page that doesn't offer value to anybody. Normally, we shouldn't have pages like this, but some companies do boring stuff and creativity doesn't help. Maybe this question is stupid, forgive me but I don't get it. I am thankful for any answers on this!
Link Building | | grobro0 -
Ranking For Non-Context-Friendly Terms Without Anchor-Text
We are now at a point with Google where having a link profile that has a lot of exact match anchor text for a few main keyword targets is not a good thing. So, how do we rank for terms that do not fit into the content of your site, but are still good keyword targets. Here is an example from my situation. A good keyword target for my area and business that I am working for is "plumber riverside" or "plumber riverside ca." In a gramatical sense, these two/three words do not belong together in content, i.e they would not make a proper sentence being placed together, except with maybe a comma or period separating them. In fact, this term probably wouldn't even make a good sidebar link copy. Without having a link profile with "plumber riverside" as my most common anchor text, how can I let Google know that I should rank for this term? Anchor text used to be the go to but now you have to really minimize the use of it for exact match terms. Without on page content, it seems pretty hard. Any thoughts?
Link Building | | tonyflorespsa0 -
What's more important page authority Vs domain authority?
Hello everyone, I am fairly new to SEO so I'm still trying to get my head round everything, I am currently looking into some back links .. well looking at competitor's back links to copy. I was just wondering what's more important page authority or domain authority? So for example if a page has a page authority of 50 and a domain authority of 10 is that better than if a page have page authority 10 and a domain authority of 50. Thanks so much in advance!
Link Building | | vanplus1 -
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 -
Pagerank 0 vs Page Authority 53....?
I sometimes see sites with PageRank 0 but Page Authority 50+. For instance http://auto.beginthier.nl/: PageAuthority = 53
Link Building | | PrizeWize
mozRank = 4,64
mozTrust = 5,69
Root domain links = 42
PageRank = 0 How should i interpret these stats? If or instance i'm optimizing for a car related website (a site about: car parts, car insurrance, classic cars), would these be a good place or a bad place to get links from (ignoring the benefits of direct traffic)? PA = 53 (very good) Vs. PR = 0 (very bad)?0 -
Ranking strategy -which pages to rank?
Hi, I hope you can help. I am looking to rank for 10 keywords. My homepage has some authority. On what pages should I focus my optimisation on? Should I create a new page for each keyword and build links to these pages or try and optimise my home page for a number of keywords? If so how many keywords should you optimise for from your home page to get the most clout? Im a little confused about which strategy would be the most effective. Many thanks.
Link Building | | rpoon0 -
Tagged pages showing too many links
I'm confused - seo moz crawl shows I have lots of pages with too many links. 150 - 200 or so. I'm not sure how any of my pages can have that many links and they don't appear to to me. Here's an example: http://www.musicliveuk.com/tag/wedding-entertainment They all appear to be 'tag' pages. These pages are blocked by meta robots anyway so is this a problem and how do I fix it? I also am very confused by rel canonical. I have 300 odd pages with this warning. Is this good or bad? Plesae help!
Link Building | | SamCUK0 -
How often does Google crawls old pages, is it worth to get links from them ?
Let's say there's a blog post in my industry niche that's 2 years old. Is it worth to get a link from that blog post ? How do I know Google will actually re-crawl that page, and how long can that process take ?
Link Building | | pqdbr0