6 votes
Accepted

How to implement WordPress in a subdirectory, hosted on a different server?

The subdomain is certainly the easiest option since you are wanting to host the site on another server. The reason for this is that a hostname can only ever resolve to a single location. If you are ...
DKing's user avatar
  • 645
4 votes

.htaccess wreaking havoc on site root! Help!

As @Mike has already stated in comments, /public should be your DOCUMENT_ROOT and /includes should be entirely outside of your publicly viewable files, otherwise you are not really practising what you ...
MrWhite's user avatar
  • 42.8k
3 votes

Does a site's URL structure need to match its breadcrumb structure?

No, it's not compulsory to match the URL structure with folders. Generally, these days you see multi-level URL structure which does not represent a physical folder. It is used to categorise the ...
TopQnA's user avatar
  • 3,173
3 votes
Accepted

How to access root directory folder from public_html folder through the web using cPanel?

If you want something to be accessible publicly on the web, you should put it in the public_html folder. You can create folders within public_html as well. There is no functionality in cPanel for ...
Stephen Ostermiller's user avatar
3 votes
Accepted

css,js,img folders not available for subdomain pointing to subfolder

I referenced all assets in the html with ../img/, ../css/, ../js/ paths. These are client-side URL-paths; not server-side filesystem-paths. If the browser is currently at https://subdomain.example....
MrWhite's user avatar
  • 42.8k
3 votes
Accepted

How can I redirect my URL to rearrange the order of subdirectories in .htaccess?

Maybe something like: RewriteEngine On RewriteRule ^(example)/(\d+)/([\w-]+)/(static/1\.html)$ /$3/$1/$2/$4 [R=302,L] This externally "redirects" a URL of the form /example/{dynamic_id}/{...
MrWhite's user avatar
  • 42.8k
3 votes
Accepted

For language URLs, should the default language gets its own subdirectory or take the document root?

Either way can work fine for SEO. There is going to be no difference in crawl rate. Targeting can be done either way with hreflang. I have a site with great SEO with English at the root of the ...
Stephen Ostermiller's user avatar
2 votes

Redirect all pages within subdirectory to new page

That WordPress plugin should be able to handle this, but otherwise it's just a one-liner in .htaccess (which will also be more efficient): RewriteRule ^shop/ /products/ [R=302,L] The above directive ...
MrWhite's user avatar
  • 42.8k
2 votes

.htaccess mask redirect subdirectory to another subdirectory

Have you tried using the full URL? <script type="text/javascript" src="http:/mysite.com/lib/mylib.js"></script> or even <script type="text/javascript" src="/lib/mylib.js"></...
Steve's user avatar
  • 8,458
2 votes

Does any major website have a language specific sub-directories rather than sub-domains?

Yes there are some sites that still do use the subdirectory name for different languages. Most have moved away from that method and are using domain names such as example.es instead of es.example.com. ...
norcal johnny's user avatar
2 votes

What directory structure is typically used for domains and subdomains on a Linux Apache server

wouldn't it be under /var/www/public_html/www.example.com or would it be /var/www/public_html/example This is a completely personal call as it has (in all generic cases) absolutely no technical ...
Patrick Mevzek's user avatar
2 votes

Is it possible to setup a cookie-less directory instead of a domain?

This is not possible unfortunately. Cookies are attached at the domain level. The way many sites, including the entire stack exchange network, deal with this is by having static content stored on a ...
Chris Rutherfurd's user avatar
2 votes
Accepted

Blog on subdirectory

Perhaps this is just a misunderstanding of what is intended. Your blog doesn't have to be in a subdirectory, it can just be a link within wordpress. In fact WOrdPress is set up to do exactly what ...
Steve's user avatar
  • 8,458
2 votes

For SEO should there be a web page for every URL path segment?

Not necessarily. I have directories on almost every site I build that have empty index pages to prevent people from poking around. Example: 'localhost/mysite/images/' contains an index.php that will ...
elbrant's user avatar
  • 890
2 votes
Accepted

Is it cloaking to use translated international content in different subfolders?

Is this Wordpress default approach harmless? Absolutely. But the default WP approach is not enough. does the company have to get different domain names like something.gr, something.en, something....
Evgeniy's user avatar
  • 10.1k
2 votes

For SEO should there be a web page for every URL path segment?

Google recommends to “Consider organizing your content so that URLs are constructed logically”. So, for example, having such a URL example.com/news/astronomy/we-are-not-alone, for me it would be ...
Victor's user avatar
  • 271
2 votes
Accepted

What is the most SEO friendly way to redirect the main domain to different subdirectories?

the most SEO friendly way to redirect The most SEO friendly way is probably not to redirect at all - unless perhaps the user has already made a specific choice (during their session). ...they get ...
MrWhite's user avatar
  • 42.8k
2 votes
Accepted

Adding a subdirectory to a URL using .htaccess

RewriteRule ^/wis/9-3/1998/(.*)$ /9400/wis/9-3/1998/$1 [L] This won't work in a directory (or .htaccess) context because of the slash prefix on the RewriteRule pattern. In .htaccess only a partial ...
MrWhite's user avatar
  • 42.8k
2 votes

How to host two Github Repositories on a single domain?

There is a pretty good article on this @ Github. Basically you can set new origin in the sub directory "blog". And you have some other options like submodules and subtrees. See the answer @ ...
Tony Stark's user avatar
2 votes
Accepted

Is it possible to have a site that uses WordPress with some pages that don't

It is possible and WordPress is set up by default to allow static files. WordPress uses a front controller to have index.php handle all the URLs. But it has an exception for any static file that ...
Stephen Ostermiller's user avatar
2 votes

Does adding a canonical URL affect underlying (subdirectory) URLs?

You're not applying the canonical link to the directory, but on the page that is served when someone visits that URI. Canonical links are specific to individual pages, so applying one to the directory'...
GeoffAtkins's user avatar
  • 2,279
2 votes
Accepted

Non-existent subdirectories of index.php do not return "404 not found"

What you are seeing is default behaviour on Apache. when I enter random subdirectories, such as /index.php/asdfghjk /asdfghjk is an additional path-segment in the URL. It's not strictly a "...
MrWhite's user avatar
  • 42.8k
2 votes

Aesthetic URL problem: Website from server02 should look like its on a subdirectory of the main site from server01

In order for two servers to share the exact same domain (www.example.com) and your website to work properly the two servers would need to be a mirror of eachother in terms of content and functionality,...
richhallstoke's user avatar
2 votes
Accepted

Redirecting smaller successful site to domain of new site - SEO impacts

This looks to me like the classic question of subdomains versus subfolders for SEO. When you use subdomains, Google's algorithm has to make a judgement call of whether to treat each subdomain as a ...
Maximillian Laumeister's user avatar
2 votes

How to point a domain name to a subfolder

Make a subdomain e.g. dev.example.com, and create your new site in that space. Then when it is finished, simply move all the files to the directory containing your old site. Once you have done that ...
Steve's user avatar
  • 8,458
2 votes

Seo: tell search engines to prioritize a given subdirectory

The best way to deal with this is to have a URL for the latest event that doesn't change. Something like: http://example.org/current/ (Or maybe even just http://example.org/) Then when you create a ...
Stephen Ostermiller's user avatar
2 votes

Will the SEO of a webpage suffer if its parent directory has a redirect?

If nobody is linking to the original link, it shouldn't be a big deal for that page. Just make sure to use the correct redirect for what the purpose is (301: temporary, 302: permanent), and correctly ...
Lisa's user avatar
  • 160
1 vote

For SEO should there be a web page for every URL path segment?

Users might expect a given sub-URL-path to resolve to a valid page, but search engines (SEO) have no reason to expect this. Search engines "discover" URLs by crawling, they are not in the habit of "...
DocRoot's user avatar
  • 4,297
1 vote

SEO: Separate domain targeting each state or one domain with state-specific sections

SEO vs CTR vs Usability Duplicate Content & Canonicalization onlinetrainingqld.com.au etc would never be good unless everything about the content is different. Your keywords would be dissolved ...
Electron's user avatar
  • 314
1 vote

What directory structure is typically used for domains and subdomains on a Linux Apache server

This can be a bit tricky a question to answer. I am glad to see Ubuntu in the question. However, what is missing is whether hosting will be used or even a control panel. This is where it gets tricky. ...
closetnoc's user avatar
  • 32.8k

Only top scored, non community-wiki answers of a minimum length are eligible