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
-
JPG's listed as the Top Pages in Moz
In Moz, under Links, my Top Pages are all .jpg's. Is this unusual? Should I change the names of those jpg's and redirect the jpgs listed on the Top Pages to the html page it can be found on?
Link Building | | Boweb
Like instead of people linking to this page: https://www.freequilt.com/cat-and-the-fiddle.html it looks like from the Top Pages that people are linking directly to this image: https://www.freequilt.com/images/nursery-rhyme-series/cat-and-the-fiddle/moona.jpg
My thoughts are to rename that image so no one is linking to it, and redirect the image to the html page. Would I be hurting my Google ranking any by doing so?1 -
On-Page Grader: F, Backlink still work?
For some reason, i can't optimize the page, and on-page Grader is F, whether the backlink with anchor text still work? Any thing i can do in such situation?
Link Building | | skyten0 -
Does this count as a backlink to my category page?
I am ranking high with a certain category page and I am reading that I need backlinks to that page. It is going to be a challenge to get a backlink to that specific category page but how about this? Category page URL: www.mysite.com/category/name Backlink to this URL: www.mysite.com/category/name/specific-blog-post (EDIT: Apparently these types of links don't exist! I went into the category page and clicked on a blog post and it just gave me the www.mysite.com/blah-blah-blah) Will that count as a backlink to the category page? Right now I am only getting backlinks to these blog posts: www.mysite.com/this-is-a-blog-post Any help appreciated! EDIT: Well I guess now my question is worthless. But if you have any input, it would be appreciated.
Link Building | | dealblogger0 -
Best way to structure a service area page with many locations to maximize internal links to them?
Currently our service area page (http://www.njlimocarservice.com/services.html) very sloppily lists many of the towns we serve in multiple counties - over 50 approx (scroll down). They have been placed that way so there is links to them from one of the subpages directly linked from the root domain. I am now attempting to make it pretty and organized with my designer. I intend to maintain a link to each individual town/landing page for SEO purposes to keep it close to root domain. My questions is how to best structure this. I don't want to list by county because some people don't know what county the town is in. However an alphabetical list may be overkill as there is so many. The other option is to get a search form or dropdown list on there but how will my landing pages be recognized by crawlers if there is no internal links from my root domain? Eventually we plan to expand further so what happens when we add 100+ landing pages? What will then happen to my internal link juice? Thanks!
Link Building | | kabledesigns0 -
PPC Landing pages and SEO landing pages query
We do a fair amount of work on PPC and because of this a lot of our PPC landing pages also do quite well in SEO. We are thinking that the landing pages do well because they get a lot of traffic from PPC and therefore, maybe google can index and take note of these pages quicker? The pages that usually shoot right up the rankings are new pages used for long tailed keywords. So I have a few questions: Does the traffic from PPC actually have any effect on SEO rankings? If we were to create a page that was to act solely as an SEO landing page, would google take note if there was no traffic? Would simply linking from our main site to the landing page be enough to give it a bit of authority, in which we can build upon? Thanks in advance.
Link Building | | esendex0 -
Unblock Shopping Cart Page
Is it weird to remove the View Cart page from being blocked in robots.txt if it has links pointing to it?
Link Building | | poolguy0 -
Using parked domain page to get 50k+ of low quality links, good idea?
Hi all, I'm managing the seo for a hosting company. We have a lot of parked domains with a parked domain page. This will now be updated to promote our products. When this page is updated it will give 50k+ of low quality links to specific pages almost overnight. We curently don't have a very good seo ranking for our keywords, so there is little risk on the downside in the short term. Do you have any suggestions as to how I should go about this? Some alternatives off the top of my head: 1. get the page up an focus all the link equity on relevant pages with keywords in anchor text 2. add noindex / nofollowto all pages or only part of them to avoid puishment 3. add noindex / to the majority of the pages and "release" a percentage every week or so to avoid a "link bomb" Thanks for any and all input!
Link Building | | espenjo_mamut0 -
Is there a way to tell if a directory is passing Page Rank or is devalued?
Hi Mozzers! I was wondering if there is a way to determine if a specific directory is passing Page Rank or if the links have been devalued by Google. Thanks!
Link Building | | SparkplugDigital0