Help with htaccess
-
I just setup a WP install in a subfolder: domain.com/development/
However, there is an existing htaccess file in the root which contains the following:
RewriteRule ^([A-Za-z_0-9-]+)$ /index.php?page=$1 [QSA]
RewriteRule ^([A-Za-z_0-9-]+)/$ /index.php?page=$1 [QSA]
RewriteRule ^([A-Za-z_0-9-]+)/([a-z]+)$ /index.php?page=$1&comp=$2 [QSA]
RewriteRule ^([A-Za-z_0-9-]+)/([a-z]+)/$ /index.php?page=$1&comp=$2 [QSA]I need to leave the rules as-is due to the nature of CMS (not WP) under the root domain.
Is it possible to include an exception or condition which allows URL requests containing /development/ to resolve to that folder?
I tried to add:
RewriteRule ^development/([A-Za-z_0-9-]+)$ /development/index.php?page=$1 [QSA]
but this seems to send it in a loop back to the root.
Thanks!!!
-
Hi there,
To be able to give you an answer, could you please confirm: Do you want to apply specific rules to the pages inside the /development/ subdirectory that override the ones that are already included in the root file htaccess or something else?
Thanks for the confirmation!
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
-
PLEASE HELP - Old query string URL causing problems
For a long time, we were ranking 1st/2nd for the term "Manual handling training". That was until about 5 days ago when I realised that Google had started to index not only a query stringed URL, but also an old version of the URL. What was even weirder was that when you clicked on the result it 301 redirected to the page that it was meant to display... The wrong URL that Google had started to index was: www.ihasco.co.uk/courses/detail/manual-handling?channel=retail The correct URL that it should have been indexing is: https://www.ihasco.co.uk/courses/detail/manual-handling-training I can't get my head around why it has done this as a 301 was in place already and we use rel canonical tags which point to the main parent pages. Anyway, we slapped a noindex tag in our robots.txt file to stop that page from being indexed, which worked but now I can't get the correct page to be indexed, even after a Google fetch. After inspecting the correct URL in the new search console I discovered that Google has ignored the rel canonical on the page (Which points to itself) and has selected the wrong, query stringed URL as the canonical. Why? and how do I rectify this?
Intermediate & Advanced SEO | | iHasco1 -
Help.. there was a html and php version of my home page on my server for about a week. Now lost all rankings!
Our home page has disappeared from the Google SERPS completely. It won't even show for a search of our business name although other internal pages appear. Site appears in bing for our keywords but not for our business name. When I republished the site I got a message saying there was a php and html version of the site on the home page. I deleted this immediately but was then advised by another staff member that they had also got that message the week before but not done anything about it - so I think it was out there for about a week. Could this be the cause of the ranking drop? We have also done the following: Checked GWM for robots issue, manual action, crawl errors, blocked URLs - all good. Some crawl errors on other pages relating to broken links. All sorted and marked as fixed. Checked for duplicate content - redirected non www version of site to www Checked back links Removed video from home page that was temporarily unavailable when we did fetch and render Added canonical tag Added H1 tag that was missing Coding checked - all looks good There has been no change to the content of the page. We have fetched and rendered and resubmitted for indexing but it's still not coming back in SERPS it did for a short time the other day and then after a couple of days disappeared again Prior to all this it had ranked really well for our most important keywords for years. It's not a new site. The page is indexed as it comes up when doing a site: search. Please can anyone help? Nobody seems to have the answer and we don't know what else to do. The site is NSFW NSFW https://goo.gl/dwA8YB Main keyword sex toy party
Intermediate & Advanced SEO | | GemmaApril0 -
Help! The website ranks fine but one of my web pages simply won't rank on Google!!!
One of our web pages will not rank on Google. The website as a whole ranks fine except just one section...We have tested and it looks fine...Google can crawl the page no problem. There are no spurious redirects in place. The content is fine. There is no duplicate page content issue. The page has a dozen product images (photos) but the load time of the page is absolutely fine. We have the submitted the page via webmaster and its fine. It gets listed but then a few hours later disappears!!! The site has not been penalised as we get good rankings with other pages. Can anyone help? Know about this problem?
Intermediate & Advanced SEO | | CayenneRed890 -
Help with Best Content Posting Approach - WordPress site
I have a word document that i would like to add to my wordpress site as a page. The document has a large detailed flow chart of a complex legal process. (about 20+ boxes in the flow chart). I do not want to add it as an image because i want search engines to read/index the information in the flow chart. any suggestions to post this detailed flow chart on a WP page in the best SEO manner? Thanks.
Intermediate & Advanced SEO | | CamiloSC0 -
Help! Why did Google remove my images from their index?
I've been scratching my head over this one for a while now and I can't seem to figure it out. I own a website that is user-generated content. Users submit images to my sites of graphic resources (for designers) that they have created to share with our community. I've been noticing over the past few months that I'm getting completely dominated in Google Images. I used to get a ton of traffic from Google Images, but now I can't find my images anywhere. After diving into Analytics I found this: http://cl.ly/140L2d14040Q1R0W161e and realized sometime about a year ago my image traffic took a dive. We've gone back through all the change logs and can't find where we made any changes to the site structure that could have caused this. We are stumped. Does anyone know of any historical Google updates that could have caused this last year around the end of April 2010? Any help or insight would be greatly appreciated!
Intermediate & Advanced SEO | | shawn810 -
Help with domain configuration in international markets
We have just taken on a new client who’s core business is based in the UK. They are currently developing a market in Australia and are hoping to develop future markets over the next few years. The website is currently hosted in the UK, under a .co.uk domain, we are redeveloping the website and are wondering if we should move to the .com as the company is now catering to an international market. I was also wondering what the best way of establishing a presence in Australia, using the main website, rather than creating a new one. Thanks Fraser
Intermediate & Advanced SEO | | fraserhannah0 -
Does a 'Certified Domain' help SEO?
I see that GoDaddy offer a 'Certified Domain' option. Does this help SEO at all?
Intermediate & Advanced SEO | | Techboy0 -
Help Needed - 301 a .co.uk to a .com Serp Questions
Hey, really need some help deciding what to do... I have a .co.uk site, its my oldest and best site of my network and accounts for maybe 30-40% of my income. Although its a .co.uk site, it actually makes most of its from from USA traffic and targets many terms for the US market - but the problem is that due to it being a .co.uk it doesnt rank as well in G .com and over the last few years Google has defiantly widened the gap as such for the ability for a .co.uk to rank in G .com. Many terms that I used to be #1 for in G .com, I now rank position 5-10 only, but in G .co.uk I'm #1 and often with a duo listing so I wouldnt put the loss of rankings in G .com down to just losing rankings naturally. Now many of my key pages are gradually losing rankings in G .com which is not good and really frustrating Feedback Needed So my dilemma is do I risk my best site and 301 it to a .com hosted in the US for potential at a guess 50% increase in revenues and more future potential (If the 301 worked well and got some US rankings back - Im sure longtail would increase lots too) ? If people with experience with 301ing sites to a new domain could let me know how they did or if you're an SEO and have done this many times, how many times on average has Serps remained stable / unchanged ? Trying to work out the reward to risk ratio, like on average if the transition is seamless 90% of the time it would seem worth the gamble, but if its 50% then I would say its not worth it.
Intermediate & Advanced SEO | | goody2shoes0